ubuntu cron 执行失败,急

205 天前
 qhy0802he
ubuntu cron 执行系统 date 命令后只有日志:Permission denied 。完全没有头绪。
尝试了关闭 selinux/apparmor
尝试了调整相关配置文件权限

还有啥好办法?在线等
1160 次点击
所在节点    Ubuntu
15 条回复
wheat0r
205 天前
这信息也太少了
devswork
205 天前
命令前面加上 sudo

编辑 sudoers:
myuser ALL=(ALL:ALL) NOPASSWD: /bin/date
myuser 是你的用户名,/bin/date 是 date 命令的绝对路径

再试下看看能不能行
devswork
205 天前
我用的 centos7 ,date 命令路径是 /usr/bin/date
ubuntu 可以用下 whereis date 来查下命令的绝对路径
AoEiuV020JP
205 天前
按理说 date 不需要啥搞权限的,而且 cron 正常来说是 root 权限的,
总之 cron 里运行 id 命令看看情况,
goodman111
205 天前
着急就手动执行一下。
thinkm
205 天前
调试一下
julyclyde
205 天前
是系统级 crontab 还是用户级 crontab 啊?
把 crond 的日志上下文都发上来看看

说实话我不太信这句日志是 date 产生的
defunct9
205 天前
开 ssh ,让我上去看看
yolee599
205 天前
date 指令不需要什么权限的啊
chauncychan
205 天前
起码把命令给贴上来吧
zhanglintc
205 天前
开 ssh ,让我上去看看
Nooooobycat
205 天前
Apache: Troubleshooting any problem without the error log is like driving with your eyes closed.

https://httpd.apache.org/docs/2.4/getting-started.html
Masoud2023
205 天前
开 ssh ,让我上去看看
defunct9
205 天前
@zhanglintc @Masoud2023 说这句话要小心 Livid 封了账号
zhanglintc
204 天前
@defunct9 #14 还有这种危险啊?那我以后不说了

这是一个专为移动设备优化的页面(即为了让你能够在 Google 搜索结果里秒开这个页面),如果你希望参与 V2EX 社区的讨论,你可以继续到 V2EX 上打开本讨论主题的完整版本。

https://www.v2ex.com/t/983430

V2EX 是创意工作者们的社区,是一个分享自己正在做的有趣事物、交流想法,可以遇见新朋友甚至新机会的地方。

V2EX is a community of developers, designers and creative people.

© 2021 V2EX