Having a SSD - it is recommended to mount /tmp
as tmpfs
.
Examples:
- https://askubuntu.com/questions/550589/best-way-to-mount-tmp-in-fstab
- https://yktoo.com/en/blog/post/233
- https://askubuntu.com/questions/173094/how-can-i-use-ram-storage-for-the-tmp-directory-and-how-to-set-a-maximum-amount
The mounting options are different in each example - why???
The default Ubuntu 16 installation sets the mounting options for root (/
) as (from /etc/mtab
):
/dev/sda1 / ext4 rw,relatime,errors=remount-ro,data=ordered 0 0
Ergo all other options - as suggested in the examples/links - shouldn't be applied.
Some of the mounting options in the various examples on the web are:
defaults,noatime,mode=1777
or:
defaults,noatime,nosuid,nodev,noexec,mode=1777,size=512M
But:
- Having
noatime
feels useless because that the data is stored in RAM which is fast anyway. - Why
nosuid,nodev,noexec
?
How do they know whether softwares are dependent on certain options or not?
I think it is best to stick with the default permissions that the installation applied, meaning:
rw,relatime,mode=1777,uid=0,gid=0
In order to ensure proper operation of various softwares:
- The permissions are 1777 because that the default permissions for
/tmp
are alsodrwxrwxrwt
(seestat -c "%a %n" /tmp
). - The
uid
andgid
areroot
because that/tmp
has the same.
Is there something which I'm missing here?
ls
fits 12 permission bits into 9 character positions. – Mark Plotnick Mar 18 '17 at 18:511776
and1777
? – Dor Mar 19 '17 at 08:00