Answer the question
In order to leave comments, you need to log in
How to give a file root executable permissions in Ubuntu 16.04?
There is a script that should create files when the computer is turned on. It seems that I did everything, but I can’t catch up with how to give root rights to the script so that it can start from startup without asking for a password.
did chown root:root /path.to/script/some.sh
wrote in sudoers:
me ALL=(ALL) NOPASSWD: /home/me/Desktop/logCreator.sh
# Cmnd alias specification
Cmnd_Alias sh = /home/me/Desktop/sh.sh
в конце файла :
me ALL=(ALL) NOPASSWD: sh
Answer the question
In order to leave comments, you need to log in
in sudoers write
me ALL=NOPASSWD: /path.to/script/some.sh
run
sudo /path.to/script/some.sh
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question