2 個答案
- 最新
- 最多得票
- 最多評論
1
Hello.
Even if I set "sudo" in the command set in cron, it fails to execute?
If you run it as the root user, it should generally run successfully.
To troubleshoot, start by enabling sudo.
https://stackoverflow.com/questions/70099692/crontab-sudo-docker-permission-denied
0
When you run docker commands interactively, your shell session has access to the Docker socket (usually docker.sock) because your user is in the docker group. However, cron jobs run in a minimal environment without loading group memberships the same way.
For a quick fix, try to run the cron job as root:
sudo crontab -e
已回答 3 個月前
相關內容
- 已提問 10 個月前
