Server Fault is a question and answer site for system and network administrators. It's 100% free, no registration required.

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

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

/var and /var/tmp

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

share|improve this question
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


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.