Server Fault is a question and answer site for system and network administrators. Join them; it only takes a minute:

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

You can set memory usage limits for standard Linux applications in: /etc/security/limits.conf

Unfortunately, I previously thought these limits only apply to user applications and not system services. This means that users can by bypass their limits by launching applications through a system service such as screen. I'd like to know if it's possible to let users use screen but still enforce application limits.

Jeff had the great idea of using nohup which obeys user limits (wonderful!), but I would still like to know if it's possible to mimic the useful windowing features of screen.


It seems my screen sessions are now obeying my hard address space limits defined in /etc/security/limits.conf. I must have been making some mistake. I recently installed cpulimit, but I doubt that's the solution.Thanks for the nohup tip, Jeff! It's very useful.

Link to CPU Limit package

share|improve this question
If you give someone access to your system, the fact that they are able to spawn processes is not an exploit. I'd rephrase the title of your question. – gparent Apr 5 '12 at 17:59
The exploit comes from users being able to circumvent limits defined in limits.conf by using screen. I think the term "exploit" is appropriate. – collinjsimpson Apr 5 '12 at 18:01
Which limits are they able to circumvent, exactly? – Kyle Smith Apr 5 '12 at 20:11
Address space limits, CPU time, number of locks, and others as defined in limits.conf. Link here: – collinjsimpson Apr 5 '12 at 22:18
up vote 1 down vote accepted

I'm not going to comment on whether that's an actual 'exploit' or intended behavior, but the work-around for this situation is to not allow access to screen. If they/you need to run a process while they're logged out they could use nohup.

share|improve this answer

Your Answer


By posting your answer, you agree to the privacy policy and terms of service.

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