Script executed by www-data creates an at job.
Afterwards, normal Linux user cannot remove this job (atrm) because "Not owner".
How can this be achieved?
Script executed by www-data creates an at job.
Afterwards, normal Linux user cannot remove this job (atrm) because "Not owner".
How can this be achieved?
Best would be to use sudo
to remove another user's job. To limit thesudo
command of the user that should be able to kill the job, add a sudo
rule as follows.
user ALL=(www-data) /usr/bin/atrm
Where
user
is the username you want to be able to kill the jobALL
is the hostname that is allowedwww-data
is the user which is allowed to run this command/usr/bin/atrm
is the command that the user
is allowed to run. Now your user
can execute atrm
as the user www-data
.
sudo -u www-data /usr/bin/atrm <job-number>