试图使用at命令,当我以除root以外的任何人身份运行时,我一直得到输出错误。
root@myserver3:~/# at now
warning: commands will be executed using /bin/sh
at> echo "this is root" > /tmp/at.out.txt
at> <EOT>
job 3 at Thu Jun 4 19:15:00 2020
root@myserver3:~/# cat /tmp/at.out.txt
this is root
root@myserver3:~/# exit
exit
rich@myserver3:~/$ at now
warning: commands will be executed using /bin/sh
at> echo "This is me" > /tmp/at.out.me.txt
at> <EOT>
at: Output error
rich@myserver3:~/$ cat /tmp/at.out.me.txt
cat: /tmp/at.out.me.txt: No such file or directory
我试过重新安装at (apt-get remove --purge at;apt-get install at
),但这似乎没有帮助。我可以看到,在 /var/spool/cron/atjobs /var/spool/cron/atspool
都在那里,权限看起来也没问题。