I was under the impression that any sort of call to mount
requires root privileges.
But recently I was told "You should instead create appropriate entries in /etc/fstab
so that the filesystems can be mounted by unprivileged users"... which is counter to my experience using mount
.
Anytime I have used mount
I have needed to sudo
it. (I have only used mount
for mounting network drives. Specifically cifs type network drives.)
Does mount always require root privileges? If not:
- What kind of mount does and what kind of mount doesn't require
sudo
IN GENERAL? - In my specific case I am doing
mount -t cifs
, how does one go about making this mount not require requiresudo
?
noauto
(or specify it explicitly withauto
). Automounting means that the share will be mounted withmount -a
, and usually will also be mounted on system startup. – Chris Down Sep 16 '11 at 01:52man 8 mount.cifs
), or read it online here. For other filesystems, they are usually either in the manual page for the specific mount invocation for that filesystem type, or, if included in the kernel, are often in the kernel documentation. – Chris Down Sep 16 '11 at 01:57cifs
and the fourthnoauto,user
? – enzotib Sep 16 '11 at 07:24/etc/fstab
), it's handled byudisks
or similar. – Chris Down Sep 16 '11 at 09:52domain
, be sure to specify it.Failing to do either will likely result in unhelpful "permissions" error messages. Even more confusing, trailing \s seem to allow mounting with sudo but fail without - completely baffling.
– Chris Keefe Jan 13 '21 at 02:49