ubuntu cron 执行系统 date 命令后只有日志:Permission denied 。完全没有头绪。
尝试了关闭 selinux/apparmor
尝试了调整相关配置文件权限
还有啥好办法?在线等
尝试了关闭 selinux/apparmor
尝试了调整相关配置文件权限
还有啥好办法?在线等
1
wheat0r Oct 19, 2023
这信息也太少了
|
2
devswork Oct 19, 2023
命令前面加上 sudo
编辑 sudoers: myuser ALL=(ALL:ALL) NOPASSWD: /bin/date myuser 是你的用户名,/bin/date 是 date 命令的绝对路径 再试下看看能不能行 |
3
devswork Oct 19, 2023
我用的 centos7 ,date 命令路径是 /usr/bin/date
ubuntu 可以用下 whereis date 来查下命令的绝对路径 |
4
AoEiuV020JP Oct 19, 2023
按理说 date 不需要啥搞权限的,而且 cron 正常来说是 root 权限的,
总之 cron 里运行 id 命令看看情况, |
5
Hf1G1sGBYS8QSLN8 Oct 19, 2023
着急就手动执行一下。
|
6
thinkm Oct 19, 2023
调试一下
|
7
julyclyde Oct 19, 2023
是系统级 crontab 还是用户级 crontab 啊?
把 crond 的日志上下文都发上来看看 说实话我不太信这句日志是 date 产生的 |
8
defunct9 Oct 19, 2023 开 ssh ,让我上去看看
|
9
yolee599 Oct 19, 2023 via Android
date 指令不需要什么权限的啊
|
10
chauncychan Oct 19, 2023
起码把命令给贴上来吧
|
11
zhanglintc Oct 19, 2023
开 ssh ,让我上去看看
|
12
Nooooobycat Oct 19, 2023
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 |
13
Masoud2023 Oct 19, 2023
开 ssh ,让我上去看看
|
14
defunct9 Oct 19, 2023
@zhanglintc @Masoud2023 说这句话要小心 Livid 封了账号
|
15
zhanglintc Oct 20, 2023
@defunct9 #14 还有这种危险啊?那我以后不说了
|