This question already has an answer here:
I have always wondered how you stop another user from entering a directory. I am in a local installation of GitLab and I see that in my
git directory I have a
repositories directory. If I try to
cd into it, it says:
me@my:/home/git$ ls repositories/ ls: cannot open directory 'repositories/': Permission denied me@my:/home/git$ cd repositories/ bash: cd: repositories/: Permission denied
ls the parent directory I see it doesn't belong to me. But I don't see anything that stops me from going in.
drwxrws--- 3 git git 4096 Jul 5 00:47 repositories
How is it stopping me from entering or exploring this directory?
I am not interested in getting into this directory. I am more interested in how they stopped me from getting into it and how I can stop others from getting into directories in the future.