at-job

at command throws 'cannot set egid: Operation not permitted error'


I'm trying to execute a command using the following command:

/usr/local/bin/php xxx.php | at now + 10 minutes

However, terminal throws this error:

cannot set egid: Operation not permitted error

I tried adding the user to /etc/at.allow but that doesn't help. I also removed /etc/at.deny, but that also didn't help. Any ideas what is up? How can I give permission to the user to utilize the at command?


Solution

  • The permissions on /usr/bin/at are incorrect, it needs to be setuid to root:

    sudo chmod u+s /usr/bin/at