报错:

sudo:sorry, you must have a tty to run sudo.


在shell脚本调用perl之前加上sudo,shell脚本单独执行是没有错误的。


解决crontab问题:


chmod 640 /etc/sudoers

sudo vim /etc/sudoers

注释掉: Defaults requiretty。