Linux "at" command works fine when running from shell but fails when run from webserver Linux "at" command works fine when running from shell but fails when run from webserver bash bash

Linux "at" command works fine when running from shell but fails when run from webserver


Finally found the answer. It turns out you need three things to be true that I hadn't set before.

  1. You need to have the absolute path to the program you're calling(php had to be /usr/bin/php) - Thanks mti2935.
  2. You need to have a shell set up for your apache user. - Thanksfor getting me started in this direction craniumonempty. The commandI had to run was : sudo chsh -s /bin/bash username
  3. Lastly you have to have an at.allow file created with thewww-data group and apache user in it. (Make sure there is NOT aat.deny file, as this will counteract the allow.).

Once all of these are set the at will run successfully from your webserver. Also, be sure to have the basics which I went over in the main post. Give read/write/execute to apache for the script you're running, make sure the script itself works without running it with at, and verify the at job is being created.

Thank you all for the assistance.