Move /tmp and /var/tmp to a separate filesystem

October 22, 2015 — Leave a comment

There are many reasons you might need to mount your /tmp dir as a separate filesystem. Not doing this is a major security flaw and could potentially allow remote executables to run on your system without your permission.

Backup your fstab

Create 1GB tmpmnt partition file

Format new partition

Press Y when asked

Backup old /tmp

Mount the new /tmp filesystem

Set the appropriate permissions

Copy files back to /tmp

Add new /tmp to fstab

Symlink /var/tmp to /tmp

Or, do it quick 🙂

(hit ‘y’)

No Comments

Be the first to start the conversation.

Leave a Reply