Quantcast
Channel: Permission denied only when using "sudo su -c" - Ask Ubuntu
Viewing all articles
Browse latest Browse all 2

Permission denied only when using "sudo su -c"

$
0
0

I am currently trying to run a script as a different user than the user I am logged in.

I would like to run as main user the following command, to have the user local executing the script:

sudo su local -c "/home/main/some/folders/script"

But I have a Permission denied output.

Still, if I log in as local using sudo su local and then run the script, everything goes fine. The permission on the file are 775 main main and user local is part of the group local main

What could be the reason for this, and how to solve it ?

Thanks


Viewing all articles
Browse latest Browse all 2

Latest Images

Trending Articles





Latest Images