crontabs/username: Permission denied

Written by James McDonald

April 27, 2008

I just had an issue where I tried to issue crontab -e as a user and got
crontabs/username: Permission denied

The problem was traced to deleting an old account that had a crontab then recreating the account later which had a different user id.

Note here how the username directory has a uid “1000” and not a login name associated with it. Therefore when attempting to run crontab -e permission is denied because the user doesn’t have access to it’s own crontab file.

root@blackbox:/var/spool/cron/crontabs# ls -al
-rw------- 1 user1 crontab 298 2008-04-27 18:02 user1
-rw------- 1 1000 crontab 230 2008-03-13 14:00 username

The fix – change the ownership of the crontab file:

root@blackbox:/var/spool/cron/crontabs# chown username.crontab username -Rv
changed ownership of `username' to username:crontab

0 Comments

Submit a Comment

Your email address will not be published. Required fields are marked *

You May Also Like…

PDF Poster

PDF Poster

Start with a wide long image. This is just a screen shot of my desktop. widescreen.png Convert it to postscript using...

Scribus to PDF Print

Just using Scribus to design and print some lapel cards Regarding Scribus - It seems that the stable version will not...