hosted by liquidweb


Go Back   Web Hosting Talk : Web Hosting Main Forums : Hosting Security and Technology : bash,linux nice - priority for users not root?
Reply

Hosting Security and Technology Configuring and optimizing web hosting servers and operating systems, developing administration scripts, building servers, protecting against hackers, and general security (SSL certificates, etc.)
Forum Jump

bash,linux nice - priority for users not root?

Reply Post New Thread In Hosting Security and Technology Subscription
 
Send news tip View All Posts Thread Tools Search this Thread Display Modes
  #1  
Old 09-06-2004, 06:52 PM
nand nand is offline
WHT Addict
 
Join Date: Apr 2004
Posts: 111

bash,linux nice - priority for users not root?


Is it possible to allow changing priority for users (not root) on linux?

bash-2.05b$ nice -n -5 ./sdf
nice: cannot set priority: Permission denied


i triend to add to etc/security/limits.conf

user hard priority -10
user soft priority -10


bot he still cant change priority by nice or renice

1. any way to do it?

2. any way to set default priority for proceses runned by this user?

Reply With Quote


Sponsored Links
  #2  
Old 09-07-2004, 03:05 AM
ABliss ABliss is offline
Newbie
 
Join Date: Feb 2004
Posts: 18
From /etc/security/limits.conf
# - priority - the priority to run user process with

user hard priority 0

would set the defaults priority of this user's process to 0. In most Unices (someone correct me if I'm wrong), user processes are not allowed to have a priority below 0. Negative priorities can be used by root only and are meant for system-critical processes. By running an application with a negative priority, you are going to block the CPU from doing important things.

Reply With Quote
  #3  
Old 09-07-2004, 03:49 AM
Mr.TOXIC Mr.TOXIC is offline
Disabled
 
Join Date: Sep 2004
Location: 20 00 N, 77 00 E
Posts: 51
Hola

You can can give the user privileges to nice or renice by adding him in the sudoers file (eg: /etc/sudoers).

Edit the sudoer file and add the following....

username ALL= NOPASSWD:/usr/bin/renice,/bin/nice

The user can execute renice or nice using

sudo renice -options
sudo nice -options

Reply With Quote
Sponsored Links
  #4  
Old 09-07-2004, 03:59 AM
wKkaY wKkaY is offline
Web Hosting Evangelist
 
Join Date: Apr 2003
Location: Melbourne, AU
Posts: 539
Quote:
Originally posted by ABliss
In most Unices (someone correct me if I'm wrong), user processes are not allowed to have a priority below 0. Negative priorities can be used by root only and are meant for system-critical processes.
for Linux and FreeBSD, any process regardless of user can have a negative nice. however, only root can set (by means of nice or renice) a process's nice to below 0 or below the current nice, whichever is higher.

Reply With Quote
Reply

Related posts from TheWhir.com
Title Type Date Posted
Big Data and Cloud Drive Enterprise Linux Adoption: Report Web Hosting News 2013-03-27 12:54:34
CloudLinux Improves Virtualized File System for Shared Web Hosts Web Hosting News 2012-05-30 15:17:05
Linux OS CloudLinux Releases Virtualized File System for Shared Web Hosts Web Hosting News 2012-02-16 14:22:51
Linux Foundation Website Down After Security Breach Last Week Web Hosting News 2011-09-12 20:32:11
Amazon EC2 Hosting Now Runs Red Hat Enterprise Linux Web Hosting News 2011-06-23 14:48:05


Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes
Postbit Selector

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off

Forum Jump
Login:
Log in with your username and password
Username:
Password:



Forgot Password?
Advertisement:
Web Hosting News:



 

X

Welcome to WebHostingTalk.com

Create your username to jump into the discussion!

WebHostingTalk.com is the largest, most influentual web hosting community on the Internet. Join us by filling in the form below.


(4 digit year)

Already a member?