Answer the question
In order to leave comments, you need to log in
How to give the user the ability to add cron tasks?
There is a server with Ubuntu 12.04. When I try to add a job to cron from an unprivileged user, I get an access error:
$ crontab -e
crontabs/user/: fdopen: Permission denied
# ls -l /usr/bin/crontab
-rwxr-xr-x 1 root root 35896 Jun 20 2012 /usr/bin/crontab
ls -l /var/spool/cron/crontabs/
total 4
-rw------- 1 root root 1563 Jul 7 12:04 root
Answer the question
In order to leave comments, you need to log in
User cron files are located in /var/spool/cron/crontabs
Check the permissions on this folder, there must be access for the crontab group.
The user must also be a member of the crontab group.
$ sudo ls -l /var/spool/cron/
итого 12
drwxrwx--T 2 daemon daemon 4096 апр. 1 2013 atjobs
drwxrwx--T 2 daemon daemon 4096 июня 11 2012 atspool
drwx-wx--T 2 root crontab 4096 июля 13 11:25 crontabs
sudo ls -l /var/spool/cron/crontabs
итого 4
-rw------- 1 rsa crontab 1104 июля 13 11:28 rsa
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question