注意:以下文档只适用于TOP接口,请谨慎使用!
crontab -e
命令,提示如下错误。
[root@iZ*****kZ ~]# crontab -e crontab: installing new crontab /var/spool/cron/tmp.XXXX6bK9dR: Permission denied crontab: edits left in /tmp/crontab.ssXqpW
/var/spool/cron/
目录无法写入。
目录被设置为不能被删除、改名、设定链接关系,同时不能写入或新增内容。
/var/spool/cron/
目录。
cd /var/spool/cron/
touch test
touch: cannot touch `test': Permission denied
lsattr cron/
----i--------e- cron/authorized_keys ----i--------e- cron/crontabs ----i--------e- cron/root
注:“i”属性设定文件不能被删除、改名、设定链接关系,同时不能写入或新增内容。
chattr -i cron/
crontab -e
命令,系统显示类似如下。
[root@iZ****kZ cron]# crontab -e crontab: installing new crontab crontab: error renaming /var/spool/cron/tmp.XXXXwhWDUP to /var/spool/cron/root rename: Operation not permitted crontab: edits left in /tmp/crontab.5f279w
chattr -i cron/root
crontab -e
命令,系统显示类似如下,表示恢复正常。
crontab: installing new crontab