Reputation: 405
We use open-shift, and the docker container only could be run as non-root user.
However, the cron failed start with error:
seteuid: Operation not permitted
I have already done the following settings, the error is still there
chmod gu+rw /var/run
crontab -u my_user home/my_user/Base/cron.txt
usermod -a -G root,crontab my_user
How to avoid the error?
Upvotes: 4
Views: 9872
Reputation: 11
I had the same issue, running crontab on a noon-root user in docker.
Thank to @Ken, the below command did the trick:
chmod gu+rw /var/run
chmod gu+s /usr/sbin/cron
Upvotes: 0
Reputation: 405
I use the following to solve the issue. Hope could be the help to others
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
Upvotes: 11