MilesWeb Hosting Forum

Web Hosting Technical Support => Errors and Solutions => Topic started by: Dipak Bhoi on May 20, 2015, 01:20:19 PM

Title: crontab: error renaming /var/spool/cron/tmp.XXXXkY5ZHV to /var/spool/cron/root
Post by: Dipak Bhoi on May 20, 2015, 01:20:19 PM
Hello folks,

One of our client was facing below error while editing a crontab.

Quoteroot@X [/tmp]# crontab -e
crontab: installing new crontab
crontab: error renaming /var/spool/cron/tmp.XXXXDSGEDV to /var/spool/cron/root
rename: Operation not permitted
crontab: edits left in /tmp/crontab.xO3YcB

After investigating on it, I found that file /var/spool/cron/root has a chattr set.

Quote#lsattr /var/spool/cron/root
-u--ia-------e- /var/spool/cron/root

To resolve this error, you need to remove this chattr.

Quote# chattr -aui /var/spool/cron/root

Now try to edit crontab, it should work fine.

Quote# crontab -e
crontab: installing new crontab

That's all. Enjoy ..!! :) :)