Quantcast
Viewing all articles
Browse latest Browse all 2

Answer by Patrick Heyman for Permission denied only when using "sudo su -c"

Does the user local have permissions to access the folders in the path to the file? Just because it has permissions on the file doesn't mean it can access the file.

as user main, try

su local
<enter password>
touch /home/main/some/folders/script

To solve it, you'll need to chmod g+rx each directory in the path

(Note that to run a script, the user doesn't actually need read permissions, on a directory, just execute permissions.)


Viewing all articles
Browse latest Browse all 2

Trending Articles