LX0-103 · Question #37
To allow a regular user account to mount and unmount a filesystem (for instance, a cdrom or floppy), which option need to be added to the corresponding line in /etc/fstab?
The correct answer is C. user. The 'user' option in /etc/fstab grants regular users permission to mount and unmount a specific filesystem without requiring root privileges.
Question
To allow a regular user account to mount and unmount a filesystem (for instance, a cdrom or floppy), which option need to be added to the corresponding line in /etc/fstab?
Options
- Anouidchk
- Balluser
- Cuser
- Dauto
How the community answered
(44 responses)- A2% (1)
- B7% (3)
- C89% (39)
- D2% (1)
Why each option
The 'user' option in /etc/fstab grants regular users permission to mount and unmount a specific filesystem without requiring root privileges.
'nouidchk' is not a valid or recognized /etc/fstab mount option and has no effect on user mount permissions.
'alluser' is not a valid /etc/fstab option - the valid multi-user variant is 'users' (plural), which allows any user to unmount regardless of who mounted it.
Adding 'user' to the options field of an /etc/fstab entry allows any non-root user to execute mount and umount on that specific device. This is commonly used for removable media like cdroms or floppies so desktop users can manage them without sudo. The 'user' option also implies 'noexec', 'nosuid', and 'nodev' by default for security.
'auto' controls whether the filesystem is mounted automatically at boot time and has nothing to do with which user accounts can mount it.
Concept tested: fstab user mount permissions for non-root users
Source: https://man7.org/linux/man-pages/man5/fstab.5.html
Topics
Community Discussion
No community discussion yet for this question.