Skip to content


crontabs/username: Permission denied

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

Posted in Linux Tools.


0 Responses

Stay in touch with the conversation, subscribe to the RSS feed for comments on this post.



Some HTML is OK

or, reply to this post via trackback.



Page optimized by WP Minify WordPress Plugin