Jump to content

Shell_exec won't work with crontab


tibberous

Recommended Posts

When I type the line, crontab -u nobody /home/express/public_html/control/crontabs/process.cron, into putty, it works.

 

Same line, shell_exec("crontab -u nobody /home/express/public_html/control/crontabs/process.cron");

 

Doesn't work.

 

/etc/crontab and /usr/bin/crontab are both set to 777.

 

I tried changing crontab to /usr/bin/crontab

 

I just don't know what else to do, shell_exec doesn't seem to work anything like real shell commands. I get NO output, it just doesn't work.

 

 

Link to comment
Share on other sites

No.

 

I think my problem might because PHP is running it as nobody, and I'm running it as root, but there is no reason why it should matter because I changed the permissions on everything.

 

...

 

If I set UID, it doesn't let me run the script at all.

 

Is there a way to set PHP to run everything as root?

Link to comment
Share on other sites

This thread is more than a year old. Please don't revive it unless you have something important to add.

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.