Take the 2-minute tour ×
Server Fault is a question and answer site for professional system and network administrators. It's 100% free, no registration required.

I am in the process of hardening a CentOS box, and came across an article that suggested mounting these filesystems onto different partitions:

/usr
/home
/var and /var/tmp
/tmp

I was wondering what exactly this accomplishes, in terms of securing the box?

share|improve this question

1 Answer 1

up vote 5 down vote accepted

In a nutshell..

/var is where logs are stored.

/tmp is able to be written to by anyone.

/home is where user data is stored.

/usr is typically where software is installed.

If these locations were stored on a single filesystem, that filesystem could be fully utilized. If / were full, it could potentially prevent the system from operating properly.

Additionally, separate filesystems can be mounted with different settings. For example, I like to mount /tmp with noexec and nosuid. If an application were compromised and had files written to /tmp, not being able to execute files would distinctly limit the ability to further compromise the system.

I would recommend reading more about the Filesystem Hierarchy Standard to better understand those locations, as my description is summarized and not complete.

share|improve this answer
    
cleared up my confusion, thanks! –  W_P Apr 29 '10 at 23:34

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.