Take the 2-minute tour ×
Super User is a question and answer site for computer enthusiasts and power users. It's 100% free, no registration required.

Can I limit the system resources that a process can use on Linux? I want to configure the system to avoid that some specified processes use some system resources:

  • choose if a process is allowed to use network and Internet.
  • choose which files and folders that a process can read, write or execute.
  • choose if a process is allowed to use sound and graphics output, and printer.
  • choose the limit of memory that it can use.

I think it is a good solution to run untrusted software without problems.

Thanks

share|improve this question
add comment

2 Answers

up vote 0 down vote accepted

The permissions of the user running the process (real user or system user...) should be appropriately set. If you're worried about a process having too much access to the rest of your system's files, can those files be secured with standard permissions? Or change the group of the user to a less permissive one?

Ignacio is on point with his SELinux, as well. Mandatory Access Controls (MAC) are very powerful and robust for this explicit purpose.

Is there a more specific problem that you're thinking of?

share|improve this answer
    
Thanks, I will try SELinux and MAC. –  Squall Mar 29 '11 at 1:03
add comment

The memory limit can be handled by ulimit. For everything else there's SELinux.

share|improve this answer
add comment

Your Answer

 
discard

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.