操作系统:Ubuntu 16.04.7 LTS(xenial)
在维护某台服务器的时候,需要增加一条计划任务,当执行crontab -e
的时候就报出来以下错误,切换到普通用户执行也是一样的。
root@iZuf62XXXXXX:~# crontab -e
/tmp/crontab.he4Yn4: No such file or directory
Creation of temporary crontab file failed - aborting
首先,确认crond的服务是否是正常运行的;随后检查crontab其他命令是否异常,发现crontab -l查看命令是正常的;然后根据第一个报错检查/tmp/crontab.he4Yn4: No such file or directory
发现文件确实不存在,然后检查/tmp目录发现此目录已经不存在了。(经过和同事了解,是有人在之前磁盘100%的时候清理过磁盘 )
root@iZuf62XXXXXX:~# mkdir /tmp
root@iZuf62XXXXXXX:~# crontab -e
Select an editor. To change later, run 'select-editor'.
1. /bin/ed
2. /bin/nano <---- easiest
3. /usr/bin/vim.basic
4. /usr/bin/vim.tiny
Choose 1-4 [2]: 3
crontab: installing new crontab
扫码关注腾讯云开发者
领取腾讯云代金券
Copyright © 2013 - 2025 Tencent Cloud. All Rights Reserved. 腾讯云 版权所有
深圳市腾讯计算机系统有限公司 ICP备案/许可证号:粤B2-20090059 深公网安备号 44030502008569
腾讯云计算(北京)有限责任公司 京ICP证150476号 | 京ICP备11018762号 | 京公网安备号11010802020287
Copyright © 2013 - 2025 Tencent Cloud.
All Rights Reserved. 腾讯云 版权所有