Reputation: 31960
If a crontab is created for the root user under Linux, using
sudo crontab -e
, then anything that's directly run by the crontab will use root permissions - see Is it possible to make a Bash file run as root in crontab?
Does this mean that any commands within the bash script will also inherit root permissions, or will any commands within the bash script need to be explicitly executed with root permissions e.g. sudo docker ps
?
Upvotes: 0
Views: 267
Reputation: 123490
There is no difference between the root user and root permissions. All scripts in root
's crontab will run as root
, and all commands therein will also run as root
, with all associated permissions.
Upvotes: 3