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.
Ask Ubuntu is a question and answer site for Ubuntu users and developers. It only takes a minute to sign up.Sign up to join this community
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.