研发侧发现,一个 php 脚本可以正常调用docker
(podman)进行一些操作,但是经由 crontab 调度则执行失败
/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/root/bin:/root/bin
/usr/bin:/bin
/usr/sbin
到底是为啥 1
L4Linux 312 天前 via Android 1
现在的趋势是 /bin /sbin /usr/bin /usr/sbin 四合一。可能发行版开发者都认为没必要了。
|
2
lululau 312 天前 1
crontab 标准写法:
/bin/bash -l -c 'your commands' |
3
julyclyde 312 天前
man crond
PAM Access Control Cron supports access control with PAM if the system has PAM installed. For more information, see pam(8). A PAM configuration file for crond is installed in /etc/pam.d/crond. The daemon loads the PAM environment from the pam_env module. This can be overridden by defining specific settings in the appropriate crontab file. |