0

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?

Uxio
  • 1

1 Answers1

1

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 job
  • ALL is the hostname that is allowed
  • www-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>
Thomas
  • 4,155
  • 5
  • 21
  • 28