Solved

I need to put some quota on disk space usage and no. off processes for a user

Posted on 2003-11-13
3
328 Views
Last Modified: 2010-04-21
I have a server and I want to give remote access to some users, but first I need to be sure that they would not fill out my processes queue whit useless processes. So I wanna put a 3 simultaneos processes limit / user, and give them only 100 or 200 MB disk space. At the limit quota problem I think that is better to let a user to run only 1 or 2  background processs,  how do I ?

    I think it can't be that hard .. but I need at least some clues.

                             Thanks for help!
0
Comment
Question by:C TG
3 Comments
 
LVL 20

Accepted Solution

by:
Gns earned 25 total points
ID: 9741155
Limiting number of simultaneous processes: ulimit -u <num>
(if you use bash... "help ulimit" or "man bash" give some more details... Most important is that users can only lower the limit, not raise it... only root can do that).
Note that limiting all users to 2 or 3 processes can have rather... unwanted effects. Best would be to place the ulimit in a global shell startup file (like /etc/profiles ... or similar), and test id, so that you only set it for the users in question. Since the shell will count as at least 1, perhaps raising the limit just somewhat from your intended value would be wise:-).

Limiting diskspace: use the quota system...
man quota quotaon edquota fstab
for details.

-- Glenn
0
 
LVL 12

Expert Comment

by:paullamhkg
ID: 9744918
Glenn already gave you the good hints, I'm just so you a url for quota setting which may be more easy for you to understand quota setting

http://www.tldp.org/HOWTO/Quota-4.html

ps. I'm just expend a bit abt Glenn suggestion, so the points should go to Glenn
0
 
LVL 2

Expert Comment

by:sam_sunder
ID: 9761997
Hi ,

You can edit /etc/security/limits.conf file for all the things which you wanted. Its very easy to do let me know if you face any problem.

regards,

sam
0

Featured Post

NFR key for Veeam Backup for Microsoft Office 365

Veeam is happy to provide a free NFR license (for 1 year, up to 10 users). This license allows for the non‑production use of Veeam Backup for Microsoft Office 365 in your home lab without any feature limitations.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

The purpose of this article is to demonstrate how we can use conditional statements using Python.
Fine Tune your automatic Updates for Ubuntu / Debian
Learn how to get help with Linux/Unix bash shell commands. Use help to read help documents for built in bash shell commands.: Use man to interface with the online reference manuals for shell commands.: Use man to search man pages for unknown command…
Learn how to find files with the shell using the find and locate commands. Use locate to find a needle in a haystack.: With locate, check if the file still exists.: Use find to get the actual location of the file.:

756 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question