Perl/Cron Conflict

K

Kris

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
 
M

MichiganBob

...
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..
 
K

Kris

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.
 
E

Eric Schwartz

Kris said:
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
 
P

Paul

Kris said:
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.
 
T

Tad McClellan

Kris said:
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.
 
A

axel

Kris said:
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
 

Ask a Question

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

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

Forum statistics

Threads
473,769
Messages
2,569,578
Members
45,052
Latest member
LucyCarper

Latest Threads

Top