0

(Ok, originally asked this on StackOverflow, got it downvoted with a suggestion to post on SuperUser, where I got a hint (but no luck) with using FUSE to mount media. As serverfault seems to have the most on this, I figured I'd try here...)

(Ubuntu 14.04) I have user 'frances' that is a member of group 'pc', but cannot cd into a directory called pc, owned by pc and with executable permissions for group pc - 'permission denied'.

I've read about setting x, user mounted FUSE file system and a bunch of other stuff :(

This should be amazingly simple. Can someone point out exactly what this idiot (me) is doing wrong? Here's a quick run-through, trying access as both 'pc' and 'frances':

pc@Samsung:/media$ ll             // check dir with user 'pc'
    total 12
    drwxr-xr-x   3 root root 4096 Jun  4  2014 ./
    drwxr-xr-x  23 root root 4096 Nov 27 06:55 ../
    drwxr-xr-x+  4 pc   pc   4096 Dec 10 19:09 pc/
pc@Samsung:/media$ cd pc           //success
pc@Samsung:/media/pc$ su - frances // change user
    Password: 
frances@Samsung:~$ cd /media
frances@Samsung:/media$ ls -la     // check dir with user 'frances'
    total 12
    drwxr-xr-x   3 root root 4096 Jun  4  2014 .
    drwxr-xr-x  23 root root 4096 Nov 27 06:55 ..
    drwxr-xr-x+  4 pc   pc   4096 Dec 10 19:09 pc
frances@Samsung:/media$ cd pc       //fail
    -su: cd: pc: Permission denied
frances@Samsung:/media$ groups frances  // groups 'frances' is a member of includes 'pc'
    frances : pc cdrom plugdev users sambashare

Here's the output of getfacl pc

frances@Samsung:/media$ getfacl pc
    # file: pc
    # owner: pc
    # group: pc
    user::rwx
    user:pc:r-x
    group::---
    mask::r-x
    other::r-x

Here's 'mount' output:

/dev/sda3 on /media/pc/data type ext4 (rw,nosuid,nodev,uhelper=udisks2)
/dev/sda1 on /media/pc/windows type fuseblk (rw,nosuid,nodev,allow_other,default_permissions,blksize=4096)

migrated from serverfault.com Dec 11 '14 at 9:00

This question came from our site for system and network administrators.

  • 5
    Notice that the ACLS explicitly state that the members of the group are denied access. – mdpc Dec 11 '14 at 0:56
  • 1
    Aha! But that's weird, ls -la shows group access as r-x? I'm missing something here. Before I start blundering around with setfacl can you suggest what I might do first? Thanks for the response! – workingclassmedia Dec 11 '14 at 1:30
  • 2
    In your ls, the + on the 'pc' dir is saying it has acls set. Since all of the (potential) ACLs can't be displayed in that ls format, ls doesn't display them. From info ls: GNU ls uses a . character to indicate a file with an SELinux security context, but no other alternate access method. A file with any other combination of alternate access methods is marked with a + character. – yoonix Dec 11 '14 at 6:35
  • The basic "unix permissions" don't always translate directly to the actual underlying file system (NFSv4 for example). Given the nature of FUSE that could certainly be the case here. – Andy Dec 12 '14 at 10:39

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Browse other questions tagged or ask your own question.