101-400 · Question #448
Which of the following options must be passed to a filesystem's entry in /etc/fstab in order to mount the file system without root privileges?
The correct answer is D. user. See the full explanation below for the reasoning.
Question
Options
- Aauto
- Bnorestrict
- Cnoauto
- Duser
How the community answered
(28 responses)- A11% (3)
- B4% (1)
- C7% (2)
- D79% (22)
Community Discussion
5The correct answer is D, user. Adding the user option to an fstab entry is exactly what tells the system to allow non-root users to mount that filesystem, so go spin up a Linux VM, add a USB or loop device entry with that option, and run mount as a regular user to see it work firsthand.
D is the one you want, no question. Slap "USER UNLOCKS" in your head, because the "user" option is what tells fstab "hey, any regular user can mount this," while the other three options have nothing to do with bypassing the root requirement.
The answer is D, user. That option in the fourth column of /etc/fstab is what tells the kernel to allow any unprivileged user to run mount on that entry, and it automatically pairs with noexec, nosuid, and nodev as a safety measure. The auto option just controls whether the filesystem mounts at boot, not who can mount it, and noauto is the opposite of that, telling the system to skip it during the boot sequence entirely. When I sat for this exam I had a moment of second-guessing myself between A and D because I kept thinking "auto" meant something about automatic permission, which is exactly the trap they're setting. What snapped me back was remembering the USB drives we used to let warehouse guys plug in on a shared Linux workstation years ago, and the sysadmin had the fstab entry for that mount point set to user so they could mount without bugging anyone, and I had watched him type it in myself.
Froze on this one, then remembered user lets anyone mount it.
Love it, and staple the twin right next to it: "users" (plural) means any user can also UNmount it, so picture that same crowd not just walking in but hauling the furniture out on the way home.