Solved mount point listing is not permitted for root

aragats

Daemon

Reaction score: 437
Messages: 1,063

I have a USB flash drive with ext4 mounted by ext4fuse:
Code:
$ mount | grep fuse
/dev/fuse on /mnt/usb (fusefs, local, nosuid, synchronous, mounted by sergeym)
Code:
$ grep ext4 /etc/fstab
/dev/da0s1   /mnt/usb   ext4   mountprog=/usr/local/bin/ext4fuse,noauto,late,rw   0   0
Here are the permissions on the directory:
Code:
$ ll -d /mnt/usb/
dr-xr-xr-x  22 root  wheel   4.0K Feb 17 16:25 /mnt/usb/
I can list/cd it as user sergeym, but not as root:
Code:
# cd /mnt/usb/
/mnt/usb/: Operation not permitted.
What's wrong here?
 

tobik@

Daemon
Developer

Reaction score: 1,361
Messages: 1,909

What's wrong here?
Nothing, this is by design. See mount_fusefs(8):
Code:
STRICT ACCESS POLICY
     The strict access policy for Fuse filesystems lets one to use the
     filesystem only if the filesystem daemon has the same credentials (uid,
     real uid, gid, real gid) as the user.

     This is applied for Fuse mounts by default and only root can mount without
     the strict access policy (i.e. the allow_other mount option).

     This is to shield users from the daemon “spying” on their I/O activities.

     Users might opt to willingly relax strict access policy (as far they are
     concerned) by doing their own secondary mount (See SHARED MOUNTS).
 
OP
OP
aragats

aragats

Daemon

Reaction score: 437
Messages: 1,063

Thanks, tobik@ ! My bad, had to check the man page first...

It seems that the message Operation not permitted is confusing.
However, I guess, the key difference in the errors reported is that if it was just a file/dir permission problem I'd see Permission denied instead.
 
Top