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 have a directory named DIR and a group GRP and two users, root and jortiz. I created DIR when logged in as root and set the group ownership of the DIR to GRP:

drwxrw-r-x 2 root GRP 4096 2009-11-12 01:04 DIR

I also added jortiz to the GRP group and logged out. I logged back in as jortiz and tried accessing the DIR directory, however, I keep getting the following error:

cd: DIR: Permission denied

What might I be doing incorrectly?

share|improve this question
    
It's a shell programming question. –  Jonathan Leffler Nov 12 '09 at 3:59
    
The problem is that you really should be sure where to move the question before moving it! Anyway, I don't have enough rep to vote to move a question, I'm happy with just answering it here. –  Arthur Reutenauer Nov 12 '09 at 3:59
    
Thanks for the comments. It's not directly related to programming, but I am writing a shell script to set up the permissions for my users (if that counts for anything). –  jortiz81 Nov 12 '09 at 4:25
add comment

migrated from stackoverflow.com Nov 13 '09 at 23:43

This question came from our site for professional and enthusiast programmers.

1 Answer

You're missing the executable flag for the group. Permissions should be drwxrwxr-x. You can fix that with chmod g+x DIR.

share|improve this answer
    
Thanks, that worked. –  jortiz81 Nov 12 '09 at 4:29
    
'r' for dirs means you can list its contents. 'x' for dirs means that you can view their contents' metadata: perms, owner, group, size, mtime. It's a convention here, not very logical :) –  kolypto Nov 14 '09 at 1:15
add comment

Your Answer

 
discard

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