Perl/Cron Conflict

Discussion in 'Perl Misc' started by Kris, May 9, 2005.

  1. Kris

    Kris Guest

    I apologize beforehand for lack of information/details. I have a cron
    with an entry that looks like this:

    2,17,32,47 * * * * /sds/force/custom/cronrep /sds/force/custom/Vine.pl
    1>/dev/null 2>>&1

    I'm running this on AIX 5.3. This worked fine before an upgrade from
    4.3. The cronrep is a wrapper that sets the environment and the
    Vine.pl file runs off that. This creates a file in a directory called
    Vineout. If I run the command manually, ie: /sds/force/custom/cronrep
    /sds/force/custom/Vine.pl, it creates the file just fine. However when
    cron runs it, I get the following error:

    No -I allowed while running setgid.

    I believe the -I option is something with Perl. We're running perl5
    5.8.0. Are there permissions that I need to change on a file?
    Anywhere to start looking? If any additional information is needed,
    I'll give you what I can. Thanks.

    Kris
    Kris, May 9, 2005
    #1
    1. Advertising

  2. Kris

    MichiganBob Guest

    "Kris" wrote ...

    > If I run the command manually, ie: /sds/force/custom/cronrep
    > /sds/force/custom/Vine.pl, it creates the file just fine. However when
    > cron runs it, I get the following error:
    >
    > No -I allowed while running setgid.
    >
    > I believe the -I option is something with Perl.


    Why do you think that? You're being told that the problem is with setgid.
    Where is it used, and how, within your script? We can't tell, since you
    neglected to post your script.

    Don't expect alot of help if you don't provide at least that much..
    MichiganBob, May 9, 2005
    #2
    1. Advertising

  3. Kris

    Kris Guest

    There's no -I option for setgid as far as I know. The reason I assumed
    Perl is because there is a -I option. I can't post the Vine.pl script
    because it is proprietary. Sorry. But there is no call to setgid in
    the script. It looks like cron is running setgid because if the
    commands are run outside of cron, there is no error. That's why I was
    wondering if there's a conflict with perl and cron. All of the entries
    in cron that don't use perl run fine. Those that do use perl is where
    I'm receiving this error. I guess if I can't get help based on this
    information, that's okay. Thanks for anything you could contribute.
    Kris, May 9, 2005
    #3
  4. "Kris" <> writes:
    > There's no -I option for setgid as far as I know. The reason I assumed
    > Perl is because there is a -I option.


    Um, many programs have -I options.

    > I can't post the Vine.pl script because it is proprietary. Sorry.


    But you could create a non-proprietary script that is the smallest
    possible program that exhibits this behaviour.

    > But there is no call to setgid in the script. It looks like cron is
    > running setgid because if the commands are run outside of cron,
    > there is no error. That's why I was wondering if there's a conflict
    > with perl and cron.


    I mean no offense here, but that's just about as silly as wondering if
    there's a conflict between gcc and cron. People worldwide have been
    using perl for cron jobs since approximately ever-- I know I have
    since perl4 was new (about when I discovered it). There may be an
    interaction between your installation of perl and/or your installation
    of cron-- this seems likely, as on my system, neither of those are
    setgid-- but that is not Perl's fault, nor is it cron's.

    > All of the entries in cron that don't use perl
    > run fine. Those that do use perl is where I'm receiving this error.
    > I guess if I can't get help based on this information, that's okay.


    Your original description gave us next-to-nothing to go on. The more
    information you can give, the easier it is for us to figure out what's
    going on.

    > Thanks for anything you could contribute.


    As a wild guess, you probably want to read perlsec ("perldoc
    perlsec"), but since we don't know anything about what you're running,
    how you're running it (sure, cron, but is this a system cronjob, or
    one running on behalf of a specific user?), or anything along those
    lines, it's a very poor guess, I'm afraid.

    -=Eric
    --
    Come to think of it, there are already a million monkeys on a million
    typewriters, and Usenet is NOTHING like Shakespeare.
    -- Blair Houghton.
    Eric Schwartz, May 10, 2005
    #4
  5. Kris

    Paul Guest

    Kris wrote:
    > I apologize beforehand for lack of information/details. I have a cron
    > with an entry that looks like this:
    >
    > 2,17,32,47 * * * * /sds/force/custom/cronrep /sds/force/custom/Vine.pl
    > 1>/dev/null 2>>&1
    >
    > I'm running this on AIX 5.3. This worked fine before an upgrade from
    > 4.3. The cronrep is a wrapper that sets the environment and the
    > Vine.pl file runs off that. This creates a file in a directory called
    > Vineout. If I run the command manually, ie: /sds/force/custom/cronrep
    > /sds/force/custom/Vine.pl, it creates the file just fine. However when
    > cron runs it, I get the following error:
    >
    > No -I allowed while running setgid.
    >
    > I believe the -I option is something with Perl. We're running perl5
    > 5.8.0. Are there permissions that I need to change on a file?
    > Anywhere to start looking? If any additional information is needed,
    > I'll give you what I can. Thanks.
    >
    > Kris
    >

    I have had some problems running perl and expect scripts from cron.

    I took the easy way out ( hold on while I don my fireproof suit ) and
    create a one-line shell script which runs the perl or expect - this
    seems have stopped my problem.
    Paul, May 10, 2005
    #5
  6. Kris <> wrote:

    > I can't post the Vine.pl script
    > because it is proprietary. Sorry.



    We cannot help you debug the Vine.pl script because it is proprietary.

    Sorry.

    Have you already contacted the supplier of the software?

    What did they say about the problem?


    > I guess if I can't get help based on this
    > information, that's okay.



    All is well then.


    > Thanks for anything you could contribute.



    What happens when you run a "Hello World" Perl program via cron?

    If it has the same problem, then release it to the Public Domain
    and post it here.

    If you can show us some broken Perl we can help you fix it.

    If you can only describe some broken Perl we probably can't.


    --
    Tad McClellan SGML consulting
    Perl programming
    Fort Worth, Texas
    Tad McClellan, May 10, 2005
    #6
  7. Kris

    Guest

    Kris <> wrote:
    > I believe the -I option is something with Perl. We're running perl5
    > 5.8.0. Are there permissions that I need to change on a file?


    How do we know? What are the permisions on the file(s)?

    Axel
    , May 10, 2005
    #7
    1. Advertising

Want to reply to this thread or ask your own question?

It takes just 2 minutes to sign up (and it's free!). Just click the sign up button to choose a username and then you can ask your own questions on the forum.
Similar Threads
  1. charles cashion

    css conflict (or html conflict)

    charles cashion, Feb 18, 2009, in forum: HTML
    Replies:
    2
    Views:
    787
    charles cashion
    Feb 18, 2009
  2. Edward

    running perl script in cron

    Edward, May 13, 2004, in forum: Perl Misc
    Replies:
    1
    Views:
    164
    Walter Roberson
    May 13, 2004
  3. PHP2
    Replies:
    9
    Views:
    307
  4. siddhartha mulpuru

    cron manipulation using perl

    siddhartha mulpuru, Sep 17, 2004, in forum: Perl Misc
    Replies:
    4
    Views:
    160
    Gunnar Hjalmarsson
    Sep 18, 2004
  5. Eric Peterson

    shutdown of linux box from cron perl script

    Eric Peterson, Jan 6, 2005, in forum: Perl Misc
    Replies:
    6
    Views:
    412
    Steven_Smith
    Jan 10, 2005
Loading...

Share This Page