Understanding Fstab mount options

Hi, I am looking for more context with the fstab mount options.

why is ‘users’ required instead of ‘root’? Can I put other options as well, like ‘auto’, ‘defaults’, or ‘nofail’?

I have also found this person’s guide: Using External Storage as Primary Storage for NextCloud which suggests these options: defaults,auto,users,rw,nofail

Thank you :slight_smile:

There are a number of options available. You can always read the man fstab page or fstab --help directly on your machine.

You can also search to discover every available option via Arch Wiki, Ubuntu Wiki, and thousands of other guides.

Have fun! Here are a few to get started:

  • auto/noauto: Specify whether the partition should be automatically mounted on boot. You can block specific partitions from mounting at boot-up by using “noauto”.

  • nouser/user: This allows the user to have mounting and unmounting privileges. An important note is that “user” automatically implies “noexec” so if you need to execute binaries and still mount as a user, be sure to explicitly use “exec” as an option.

1 Like

Thank you for your reply! I am looking them up.

UUID=YourDrive’sUUID /media/ncp ext4 rw,users 0 0

I understand why nextcloud would need rw, but is there any specific reason we would want users to mount/unmount the drive? I believe nextcloud uses the www-data user. Is this required for it to function?

www-data is part of the users group.

Yes, I get that. Does www-data need to mount/unmount the drive?

Yeah, that will give nextcloud access to the location.

Nextcloud = www-data

1 Like