QUOTE
Originally posted by mattschinkel
I like the idea of the nice command.... eg....
nice -n 19 ./command - to set low priority
nice -n -20 ./command - to set high priority
but, only root can set priority's..
If I run nice as a different user, I get the following error
"nice: cannot set priority: Permission denied"
Is there any way I can give permission to a user?
Thanks!
Any non-root user should be able to use
renice to set any process they own to a lower priority then it is currently at. I believe only root can set a process to a higher priority. Due to the fact that increasing the priority of a process can kill the box.
The best way to do it if you are having permissions problems is probably to use the
sudo command (
man sudo). Create a sudoers file in /etc that gives the user you want to have access the proper permissions to nice/renice. They will however need to enter their password whenever they use the sudo command to do this.
If for some reason a user can't lower their priorities, then I'm not sure what to do. As that should certainly be possible.