以非root用户身份运行Cron
我们使用OpenShift,docker容器只能作为非root用户运行 但是,cron启动失败,错误为:seteuid:不允许操作 我已经做了以下设置,错误仍然存在以非root用户身份运行Cron,cron,Cron,我们使用OpenShift,docker容器只能作为非root用户运行 但是,cron启动失败,错误为:seteuid:不允许操作 我已经做了以下设置,错误仍然存在 chmod gu+rw /var/run crontab -u my_user home/my_user/Base/cron.txt usermod -a -G root,crontab my_user 如何避免错误?我使用以下方法来解决问题。 希望能对别人有所帮助 chmod gu+rw /var/run chmod gu+s
chmod gu+rw /var/run
crontab -u my_user home/my_user/Base/cron.txt
usermod -a -G root,crontab my_user
如何避免错误?我使用以下方法来解决问题。 希望能对别人有所帮助
chmod gu+rw /var/run
chmod gu+s /usr/sbin/cron
# Optional
# chmod g+s, u-s /usr/bin/crontab
crontab -u my_user /home/my_user/cron.txt
我用以下方法来解决这个问题。 希望能对别人有所帮助
chmod gu+rw /var/run
chmod gu+s /usr/sbin/cron
# Optional
# chmod g+s, u-s /usr/bin/crontab
crontab -u my_user /home/my_user/cron.txt