1

ok, someone suggested I try SuperUser. Here goes... 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'.

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

Ubuntu 14.04...

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

Relevant lines of mount:

/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)
  • I assume /media/pc is a mounted filesystem? How was this filesystem mounted? Did you happen to mount it with fuse perhaps? Fuse has a feature to make a filesystem only useable by a single user. serverfault.com/questions/188894/… – Zoredache Dec 10 '14 at 22:24
  • Zoredache - that's a good lead - I'm heading into work now, will check in an hour or so! – chipbug Dec 10 '14 at 22:35
  • Zoredache - can't remember how I mounted this but I just checked FUSE and this doesn't seem familiar. I've amended the question to include the output of 'mount'... – chipbug Dec 10 '14 at 23:00
  • It is fuse based see the type fuseblk in your mount output. But you have the allow_other option enabled, so you should be able to ignore that as the source of the problem. – Zoredache Dec 10 '14 at 23:56
  • Aha! But the 'fuesblk' bit only refers to a directory within 'pc' ie 'windows'? Should I still be able to navigate into 'pc'? – chipbug Dec 11 '14 at 0:17
1

Ok, helped via https://unix.stackexchange.com/users/42924/yoonix. The '+' indicates an acl is set. Add the user as follows:

setfacl -m u:frances:rx pc

solved.

Your Answer

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

Not the answer you're looking for? Browse other questions tagged or ask your own question.