I'm aware that there are other similar questions, but nothing in there solved my issue.
gitlab-runner@my-machine:~$ groups
gitlab-runner my-user
gitlab-runner@my-machine:~$ sudo ls -l /home
total 16
drwxrwsr-x+ 16 my-user my-user 4096 Feb 13 09:22 my-user
# ... other users' homes omitted ...
gitlab-runner@my-machine:~$ sudo ls -l /home/my-user
total 528
drwsrws---+ 4 my-user my-user 4096 Jun 7 2020 my-dir
# ... irrelevant files omitted ...
gitlab-runner@my-machine:~$ sudo ls -l /home/my-user/my-dir
total 48
drwxrwsr-x+ 7 my-user my-user 4096 Aug 12 2021 my-dir
drwxrwsr-x+ 6 my-user my-user 4096 Jun 7 2020 venv
gitlab-runner@my-machine:~$ cd /home/my-user/my-dir
-bash: cd: /home/my-user/my-dir: Permission denied
The user is a member of the group, the group has read and execute permissions on the target folder and the home it's contained in, and yet the user cannot cd
into it. I have also tried logout
and then sudo - gitlab-runner
again, but it still doesn't work. Why?
I'm unsure why the x
bit shows s
and I can't find an explanation anywhere. Maybe that's relevant but I don't know what it means nor how to change it, since sudo chmod g+x
doesn't change it.