Page 1 of 1

cannot access /var/spool/cron/crontabs: Permission denied

Posted: Wed Nov 23, 2016 8:09 pm
by mister_v
I can not edit my cronfile anymore.

I get the following error message.

Code: Select all

cannot access /var/spool/cron/crontabs: Permission denied
As root it is possible.

Re: cannot access /var/spool/cron/crontabs: Permission denied

Posted: Wed Nov 23, 2016 8:26 pm
by chris
There can be several reasons:

check that the group crontab has all the necessary rights

Code: Select all

chown root:crontab /usr/bin/crontab
chmod g+s /usr/bin/crontab

Code: Select all

chown root:crontab /var/spool/cron/crontabs
chmod u=rwx,g=wx,o=t /var/spool/cron/crontabs

Re: cannot access /var/spool/cron/crontabs: Permission denied

Posted: Wed Nov 23, 2016 9:15 pm
by mister_v
Thanks.

I found the problem:
The usergroup of /var/spool/cron
was set to cron instead of crontab.

I don't know how this happened?
Perhaps with and update of cron?