S
S
silentvick2015-07-13 11:17:46
ubuntu
silentvick, 2015-07-13 11:17:46

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

The rights to the crontab file are standard, but perhaps the problem is somehow related to this:
# ls -l /usr/bin/crontab
-rwxr-xr-x 1 root root 35896 Jun 20  2012 /usr/bin/crontab

List of cron files:
ls -l /var/spool/cron/crontabs/
total 4
-rw------- 1 root root 1563 Jul  7 12:04 root

Why can't the user write to his cron, and how can I give him the opportunity to do so?

Answer the question

In order to leave comments, you need to log in

1 answer(s)
R
Rsa97, 2015-07-13
@silentvick

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 question

Ask a Question

731 491 924 answers to any question