1

Me and a teammate both have access to a server. We are both in a group that I will call team. I created a directory on the server, and with how the system is configured it defaults to drwxrws---+ with me as the owner and team as the group:

me@server:/parent_dir$ ls -l
drwxrws---+ 3 me team  4096 Dec 13 20:03 new_dir

me@server:/parent_dir$ getfacl new_dir/
# file: new_dir/
# owner: me
# group: team
# flags: -s-
user::rwx
group::rwx
other::---
default:user::rwx
default:group::rwx
default:other::---

My teammate, who I have confirmed is part of team, can cd to parent_dir. From there, when he attempts to cd to new_dir, he gets the error:

-bash: cd: new_dir/: Permission denied

Why can't he access the directory?

parent_dir:

me@server:/$ ls -l
drwxrws---+   4 root team       4096 Dec 12 21:11 parent_dir

me@server:/$ getfacl parent_dir
# file: parent_dir
# owner: root
# group: team
# flags: -s-
user::rwx
group::rwx
group:team:rwx
mask::rwx
other::---
default:user::rwx
default:group::rwx
default:other::---
  • 2
    Can you confirm that your team mate actually is in the team group? Get them to run the id command and look at the groups listed. If they have just now been added to that group, they need to log out and in again. – Kusalananda Dec 18 '19 at 21:34
  • @Kusalananda He has been in the group since his account was created a long time ago. I ran id -Gn just now to confirm once again, and team is listed. – The Guy with The Hat Dec 18 '19 at 21:38
  • I also ran id without -Gn just in case it was any different; it listed team as both primary and supplementary. – The Guy with The Hat Dec 18 '19 at 21:46
  • https://unix.stackexchange.com/q/390695/5132 is the same, but it has never been satisfactorily answered. – JdeBP Dec 19 '19 at 00:30
  • Please also add the output of getfacl /parent_dir. If there is no applicable x permission bit for your teammate, that will prevent access to any file or sub-directory of parent_dir. – telcoM Dec 19 '19 at 06:20
  • @telcoM I have edited in that information, it looks fine to me – The Guy with The Hat Dec 19 '19 at 11:57
  • What filesystem type are you using (mount | grep -F " on $(df -h /parent_dir/new_dir/ | awk 'NR>1{print $NF}') ") – Chris Davies Dec 19 '19 at 15:05
  • @roaima RAID 5 mounted to parent_dir as ext4: /dev/md126 on /parent_dir type ext4 (rw,relatime,stripe=112,data=ordered,x-gvfs-show) – The Guy with The Hat Dec 19 '19 at 16:27

0 Answers0