Advertisement

Which user does a cron job run as?

Started by July 17, 2004 06:37 PM
3 comments, last by Mr Grinch 20 years, 2 months ago
If I set up a cron job using my user ('crontab -e'), who does it actually run as? Does it run as my user, or as some sort of cron user? My problem is that I have cron run a script for me. It doesn't seem to work when cron does it, but if I execute it directly, then it works fine. Thanks for the help.
Whatever user created the cronjob.

Your problem with the script is likely due to the different nature of the way cron works.

You need to set a PATH for yourself, for instance, and make no assumptions about the current working directory.
Advertisement
Ah, you beat me to it.

yea whatever user creates the cron that is who it runs under
"crontab -e" will create a cron tab file for the user who executed the crontab command (In your case, you). If you need root access run "crontab -e" as superuser.


Maybe list your crontab and script here if you're still having problems.
Wow, thanks for the fast response. I think there may be a problem with the server (it's a sourceforge server), so I'll talk to them.

This topic is closed to new replies.

Advertisement