2

I'm running Ubuntu 14.04 and I was wondering is there a way to set some applications to run only as root?

for example the application X can normally executed by any user, and I want to set it to be executed only as root. how could I do that.

3

First, set the owner of the application to root (if it isn't already):

sudo chown root:root /path/to/app

Then configure rights with chmod, e.g.:

sudo chmod 700 /path/to/app

This would give root the right to read, write and execute while all other users have no rights. There are other possible combinations. The number 4 is for read, 2 for write and 1 for execute, just add up whatever you want.

If your command is chmod xyz, x would be the rights for owner, y for the group and z for others.

| improve this answer | |

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.