Hello, guys
I need to mount /tmp and /dev/shm with noexec option permanenty.
mount tells me this:
tmpfs on /run/user/1000 type tmpfs (rw,nosuid,nodev,relatime,size=401792k,nr_inodes=100448,mode=700,uid=1000,gid=1001,inode64)
shm on /dev/shm type tmpfs (rw,nosuid,nodev,relatime,inode64)
What do I do? Do I have to simply add something like this to my fstab:
tmpfs /tmp tmpfs defaults,noatime,noexec 0 0
?
Well noexec is the mount option you want.
But using 'defaults' is not what you want.
From the man page:
Which contradicts several of the settings listed by mount ,nosuid,nodev and the noexec that you are adding. I'm not sure what would end up with precedence ?
Also if there is already an entry in fstab for /tmp you want to edit that not add another.
This is mine
tmpfs /tmp tmpfs nodev,noexec,nosuid,size=16G 0 0
which results in
I have no fstab entry for /dev/shm and get
Sorry for the 'defaults' option. My mistake.
So it should simply go into my fstab. Thank you. Got it.