centos 7
> sudo cat /etc/cron.deny /etc/cron.allow
cat: /etc/cron.allow: 没有那个文件或目录
> sudo crontab -l -u root
* * * * * /usr/bin/vfc
> sudo crontab -l -u .xx
* * * * * /usr/bin/vfc
> sudo tail -f /var/log/cron
Apr 18 22:16:27 localhost crond[59494]: (CRON) INFO (@reboot jobs will be run at computer's startup.)
Apr 18 22:17:01 localhost CROND[59529]: (root) CMD (/usr/bin/vfc)
Apr 18 22:17:01 localhost CROND[59528]: (root) CMDOUT (/bin/sh: /usr/bin/vfc: No such file or directory)
Apr 18 22:18:01 localhost CROND[59617]: (root) CMD (/usr/bin/vfc)
Apr 18 22:18:01 localhost CROND[59616]: (root) CMDOUT (/bin/sh: /usr/bin/vfc: No such file or directory)
![]() |
1
lxk11153 OP 应该是这个用户名带.是不行的,我写了一份相同的在 /var/spool/cron/mysql 里,发现运行了
|