Take the 2-minute tour ×
Server Fault is a question and answer site for professional system and network administrators. It's 100% free, no registration required.

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
git
sh-4.1$ id
uid=495(git) gid=488(git) groups=488(git)
sh-4.1$
share|improve this question

1 Answer 1

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

 
discard

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.