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 ..!! :) :)