Umount fails for NFS mounts with "users" or "user" options

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Hi all

When /etc/mtab is a symlink to /proc/mounts, users are still able to mount
NFS volumes listed in /etc/fstab with the "user" or "users" option. 
However, attempting to unmount the same volume fails:

  umount.nfs: You are not permitted to unmount <mount-point>

The /etc/fstab entry is

  nfssvr:/home/export  /home/export  nfs  users,noauto,hard,bg,intr

The kernel doesn't track the "user" or "users" options so they don't appear
in /proc/mounts, and thus in /etc/mtab when the latter is a link to the
former.  However, when /etc/mtab is an ordinary file nfs.mount adds the
"user" or "users" option to the entry (fix_opts_string() in
utils/mount/mount.c) so the flag is available when /etc/mtab is consulted at
unmount time.

The util-linux mount tools must track the "user" and "users" options in
their own way since mounts which use those tools with these flags work fine.
I haven't quite determined where it does this: I thought it might be
/run/mount/utab, but that file isn't created on my system (Slackware64
/current) and yet user mounts still generally work.

What is the recommended way to unmount NFS volumes which are permitted to be
mounted by users via the "user" and "users" options?  The only way I can
think of is a very careful sudo entry.  It would be good though if nfs
unmount could work with the "user" and "users" options just like mount does.

Regards
  jonathan



[Index of Archives]     [Linux Filesystem Development]     [Linux USB Development]     [Linux Media Development]     [Video for Linux]     [Linux NILFS]     [Linux Audio Users]     [Yosemite Info]     [Linux SCSI]

  Powered by Linux