I am confused about the interaction between the auto
and user
mount options in fstab
.
After mistakenly setting auto
rather than noauto
, I noticed that my mount would take place when a device was inserted, but that the user could not subsequently unmount the device (the "user" being an executable running without root privileges). This is the /etc/fstab
entry:
/dev/mmcblk1p1 /home/user/importexport auto rw,user,auto,exec,uid=1000,gid=100,umask=0022,nobootwait 0 2
When I replace auto
with noauto
, the user can explicitly mount and unmount the device.
This is on an embedded system where I have no runtime visibility, meaning no shell access to interactively explore the problem. All I can do is write debugging information to files that I can view on the next boot. My kernel is 3.10.0.
So why is the user unable to unmount a device that has been auto-mounted with the user
option?
Note: In Option “user” work for mount, not for umount, somebody asked about the permissions on /etc/mtab
. Mine are -rw-r--r--
by root, but /etc/mtab
contains none of the user information alluded to in that question, so I think this may not be relevant.
auto
means that the partition will be automatically mounted at boot time and with amount -a
.noauto
means that neither is true; it must be explicitly and manually mounted. The manual page forfstab
states that theuser
option specifies that a (non-root) user may mount the partition, but is silent as to whether or not the same user may unmount it. – DopeGhoti May 27 '16 at 23:25/etc/mtab
nor/proc/mounts
reveal who mounted the partition. Any suggestions on how I might determine that? – Josh Sanford May 31 '16 at 12:39