Server Fault is a question and answer site for system and network administrators. Join them; it only takes a minute:

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

I'm installing gitlab at my server but I got a permission problem:

I have two users, 'git' and 'gitlab', both are part of group 'git', the home dir of 'git' has the drwxr----- permissions. Therefore 'gitlab' should be able to read it, but I got a permission denied when trying to change dir to 'git' home dir from 'gitlab' user.

Someone has any idea on that?

/home/git and /home/git/repositories:

523265 4 drwxr-----. 7 git  git  4096 Jul  3 06:15 git
523278 4 drwxrwx---. 7 git  git  4096 Jul  3 05:12 repositories

'gitlab' groups:

[gitlab@greenboxServer home]$ groups
gitlab git
[gitlab@greenboxServer home]$ id
uid=500(gitlab) gid=500(gitlab) groups=500(gitlab),488(git)

'git' groups:

sh-4.1$ groups
sh-4.1$ id
uid=495(git) gid=488(git) groups=488(git)
share|improve this question
up vote 2 down vote accepted

Changing directory requires the x permission on the directory. The r permission allows you to ls the directory but not cd into it.

Try chmod g+x /home/git

This may seem slightly confusing but the x permission has been re-used for this purpose because it doesn't make sense to "execute" a directory. Since that bit has no purpose for directories, it can be used to control access to change directory.

share|improve this answer
Thanks, settings g+x for /home/git also fixed permissions for /home/git/repositories. – greenboxal Jul 3 '12 at 9:59
I like to think of +x on directories as allowing you to execute a move into that directory. – EightBitTony Jul 3 '12 at 9:59

Your Answer


By posting your answer, you agree to the privacy policy and terms of service.

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