1

we want to use tmpfs on /var/work folder

what is the differences between the following tmpfs in fstab

tmpfs  /var/work   tmpfs   size=4g   0 0

to this tmpfs in fstab

tmpfs /var/work tmpfs   defaults,size=4g    0 0

second - is it necessary to defined also the - rw,nosuid,noatime,nodev ?

tmpfs /var/work  tmpfs rw,nosuid,noatime,nodev,size=4G 0 0
yael
  • 12,598
  • 51
  • 169
  • 303
  • 1
    Related: [Do you need to specify the “defaults” option in fstab?](https://unix.stackexchange.com/questions/191405/do-you-need-to-specify-the-defaults-option-in-fstab) – Freddy Mar 23 '20 at 05:02
  • what about - "tmpfs /var/work tmpfs rw,nosuid,noatime,nodev,size=4G 0 0" – yael Mar 23 '20 at 05:19
  • The `mount` man page states that `rw,suid,dev,exec,auto,nouser,async` are the defaults which also depend on the kernel and filesystem type. So I'd guess you need `nosuid,noatime,nodev,size=4G`, but better verify the options with `mount`. – Freddy Mar 23 '20 at 05:42

0 Answers0