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