当不以root身份运行时,使用at命令会产生一个输出错误。

问题描述 投票:0回答:1

试图使用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 都在那里,权限看起来也没问题。

linux command at-utility
1个回答
© www.soinside.com 2019 - 2024. All rights reserved.