I am on Ubunto 20.04 server using a single partition at / for all directories as I am running web & mail servers. I hardened tmp
, /var/tmp
, & /run/shm
using:
none /tmp tmpfs nodev,noexec,nosuid 0 0
none /var/tmp tmpfs nodev,noexec,nosuid 0 0
none /run/shm tmpfs noexec,nosuid,nodev 0 0
I would like to add the nodev
option to my /home directory without creating a whole new partition. I've added:
none /home ext4 nodev 0 0
to /etc/fstab
However, when I run mount -a
for the config to effect, I get the following message:
mount: /home: special device none does not exist.
Is this the expected output given my config or have done something fatally wrong? If someone can share a correct method to nodev
to /home
, I'd appreciate it.
thanks
Goal
I want to prevent the /home directory from being used for
defining character and block special devices. Therefore, I want to set the nodev option, so that users cannot create these types of files.