Re: mount: what is the point of 'nouser' on the command line?

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

 



On Mon, Jul 14, 2014 at 11:57:44AM +0200, Benno Schulenberg wrote:
> 
> The man page of mount(8) currently contains the following example
> to show how the -o option can be used:
> 
>     mount LABEL=mydisk -o noatime,nouser
> 
> As the command does not contain a mountpoint, it requires an entry
> in fstab in order to work.  If that entry does not contain the keyword
> 'user' in the options field, then the mount will effectively already be
> 'nouser'.  If it does contain the keyword 'user', does specifying 'nouser'
> then somehow exclude other users?  As far as I can tell it doesn't.

 It does not exclude others users. The idea of the "no*" options is 
 disable previously applied flags. The options from command line are
 evaluated after options from fstab, so for example "foo,bar" (fstab)
 and "nofoo" (command line)  means that "nofoo" negate the previous "foo".

 The "user" option is alias to "noexec,nosuid,nodev" mount flags. 
 
 I'm  not sure why, but "nouser" has never been implemented. So it does not
 have any effect and "user" from fstab is still applied -- maybe to
 avoid possible security bugs or so.

> So, is it ever useful to specify '-o nouser' on the command line?

 No, it would be better to remove it from the example and add to the
 man page note that "nouser" has no any effect and you have to 
 explicitly use "exec,suid,dev" to negate.

> Something else.  On the man page of umount, shouldn't it say that
> the -O and -t options are only effective in combination with -a?

 The -t is generic and it's usable in more case (for example to
 specify filesystem that should be tried for the device).

 The -O is really usable for -a only.

> Further, mount recognizes the options -L and -U besides the keywords
> LABEL= and UUID=, but umount only recognizes the latter two.  For
> symmetry it would be nice if umount also recognized -L and -U.

 I think -L and -U are mistakes maintained for backward compatibility,
 because TAG=value is more generic and extendable syntax. For example
 now we also supports PARTUUID= and PARTLABEL=.

    Karel

-- 
 Karel Zak  <kzak@xxxxxxxxxx>
 http://karelzak.blogspot.com
--
To unsubscribe from this list: send the line "unsubscribe util-linux" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html




[Index of Archives]     [Netdev]     [Ethernet Bridging]     [Linux Wireless]     [Kernel Newbies]     [Security]     [Linux for Hams]     [Netfilter]     [Bugtraq]     [Yosemite News]     [MIPS Linux]     [ARM Linux]     [Linux RAID]     [Linux Admin]     [Samba]

  Powered by Linux