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::---
team
group? Get them to run theid
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:34id -Gn
just now to confirm once again, andteam
is listed. – The Guy with The Hat Dec 18 '19 at 21:38id
without-Gn
just in case it was any different; it listedteam
as both primary and supplementary. – The Guy with The Hat Dec 18 '19 at 21:46getfacl /parent_dir
. If there is no applicable x permission bit for your teammate, that will prevent access to any file or sub-directory ofparent_dir
. – telcoM Dec 19 '19 at 06:20mount | grep -F " on $(df -h /parent_dir/new_dir/ | awk 'NR>1{print $NF}') "
) – Chris Davies Dec 19 '19 at 15:05/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