Ubuntu – Recommended fstab options for /home partition

fstabhome-directory

I will soon move my /home folder to a separate partition. There are hundreds of tutorials on how to do so, including here. While most agree on the basic steps, their details are very different. For copying files, for instance, some use rsync, some cp, and some find | cpio (Ill use rsync)

As for fstab entry, the options are puzzling me. The most common suggestions are:

UUID=xxx /home ext3 nodev,nosuid 0 2
UUID=xxx /home ext3 defaults,error=remount-ro 0 1
UUID=xxx /home ext4 error=remount-ro 0 1
UUID=xxx /home ext3 defaults 1 2

Its hard to know if those suggestions are outdated or obsolete. So, for Ubuntu 10.04 onwards, what are the best / recommended parameters for an ext4 /home? nodev,nosuid? defaults? Nothing? And, most important, why?

EDIT:

So far, im inclined to use

UUID=xxx /home ext4 nodev,nosuid 1 2

But I would like some background on that

Best Answer

  • nodev and nosuid are simply added layers of security that bar the creation or recognition of devnodes and suid executables on the fs. They are typically used for removable media to prevent untrusted users from inserting a disk crafted to allow them to elevate their permissions. There is little to no point in using them for /home.

    As always, unless you have specific needs for other options, defaults should be just fine.