LinuxQuestions.org
Help answer threads with 0 replies.
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Distributions > Fedora
User Name
Password
Fedora This forum is for the discussion of the Fedora Project.

Notices

Reply
 
Search this Thread
Old 03-23-2005, 12:48 PM   #1
mitchloft
LQ Newbie
 
Registered: Mar 2005
Location: Chicago area
Distribution: Fedora Core
Posts: 8

Rep: Reputation: 0
SUID problem running cron jobs?


I'm running FC3_64 with a SCSI RAID 5, 1GB ram, and seem to be having a problem getting a program to execute when running as a cron job. I'm using filePro Plus - which sets the user ID to "filepro" when it runs to maintain ownership and control of all it's database files.

I have a couple of "report" programs I need to run every few minutes to check for incoming EDI files, and process them if present. If I put the commands for these programs in a shell script and call the script from the command line - all is well, it runs fine. BUT! If I put that same script on a cron timer, it runs fine EXCEPT for the database program functions that must run with suid set. I've tried every which way I can think of, and the SUID is the only thing that makes any sense as far as causing the failure. I did NOT activate SELinux at install, and the services program sez it ain't running. This worked fine under RH9, but I think maybe the fine folks working on the Fedora project just went ahead and tightened security up to the point of making the system unusable. I've tried to find an option to crond that might defeat this, but the doc is, well, pretty much non-existant.

Anybody got any ideas on this? Thanks.
 
Old 03-23-2005, 01:53 PM   #2
WhatsHisName
Senior Member
 
Registered: Oct 2003
Location: /earth/usa/nj (UTC-5)
Distribution: RHL9;F1-10; CentOS4-5; DebianSarge-Squeeze
Posts: 1,151

Rep: Reputation: 46
mitchloft: This may have nothing to do with your problem, but are you calling the cron jobs from crontab or from the redhat-style cron.hourly, cron.daily, etc.? I had so much trouble trying to use cron.daily, that I call everything from crontab now. Using cron.daily, the jobs would only run properly about 10% of the time and I could never understand why.

I call the jobs from crontab using the root modifier, but I thought that was only used to direct the terminal messages to the root mail.

Typical /etc/crontab entry:
#
05 01 * * * root sh /root/whatever...
#
 
Old 03-23-2005, 02:38 PM   #3
mitchloft
LQ Newbie
 
Registered: Mar 2005
Location: Chicago area
Distribution: Fedora Core
Posts: 8

Original Poster
Rep: Reputation: 0
I'm using plain old cron. and running them as root's cron job, so I'm EXPECTING not to have any problems with permissions. I've pretty much tried setting permissions on all the affected files every-which-way -but -loose (and even loose...) and that doesn't seem to matter. Everything seems to run, all the debug messages I've stuck in there append to the files I've set up, it all seems to be fine EXCEPT the database program that needs to run SUID. I might try that root business inside the cron job though. I haven't needed to do that before, but what the heck - it's worth a try.

Thanks.
 
Old 03-23-2005, 02:54 PM   #4
mitchloft
LQ Newbie
 
Registered: Mar 2005
Location: Chicago area
Distribution: Fedora Core
Posts: 8

Original Poster
Rep: Reputation: 0
Nope - no help. I just get an error back saying that 'root is not a recognized command' and nothing heppens at all.
Thanks anyway...
 
Old 03-24-2005, 12:30 PM   #5
mitchloft
LQ Newbie
 
Registered: Mar 2005
Location: Chicago area
Distribution: Fedora Core
Posts: 8

Original Poster
Rep: Reputation: 0
For anyone interested:

I -think- I have it working now. I did a couple of things and I'm not sure which one(s) might have been effective.

I found that an "internal" config file for filepro did not have a TERM set. I found an error message complaining about not finding a valid TERM in the config file. The message didn't say the process failed because of it, and a background process doesn't have much need of a TERM, but I put it equal to "linux" anyway.

I also edited the /etc/sudoers file to include entrys:

cron ALL=(ALL) NOPASSWD: ALL
crond ALL=(ALL) NOPASSWD: ALL

just in case that's was causing the SUID failure.

I'm still not 100% confident this is fully functional, and I'm a little suspicious of the pam configuration stuff, but I'm hoping for the best....

Last edited by mitchloft; 03-28-2005 at 10:06 AM.
 
  


Reply


Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
shutdown only if no cron jobs are running Red Squirrel Linux - Software 4 08-31-2005 01:00 PM
problem with cron jobs umk Linux - Newbie 2 01-25-2005 10:14 AM
cron jobs working2hard Linux - Software 0 07-28-2004 05:31 PM
cron jobs not running scarr3d Linux - Software 7 05-25-2004 04:21 PM
cron jobs Zyanid Linux - Software 0 08-27-2002 05:10 AM


All times are GMT -5. The time now is 09:04 AM.

Main Menu
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
identi.ca: @linuxquestions
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration