views:

264

answers:

2

I am trying to setup my webserver so that one group will have access to the files. Apache and every user that needs to edit the files will be part of this group. So I've set all the files to have the group psacln. I've added psacln to my groups. But it still won't let me view the files:

[tom@166 httpdocs]$ whoami
tom
[tom@166 httpdocs]$ groups tom
tom : tom adm wheel apache psacln andy
[tom@166 httpdocs]$ ls -al
ls: .: Permission denied
[tom@166 httpdocs]$ sudo ls -al
total 92
d---rwx--- 14 andy   psacln 4096 Jul 22 17:51 .
drwxrwxr-x 16 apache apache 4096 Jul 21 09:29 ..
d---rwx---  4 andy   psacln 4096 Jul 21 09:26 backend
d---rwx---  3 andy   psacln 4096 Jul 22 15:21 core
d---rwx---  5 andy   psacln 4096 Jul 21 09:26 css
...
A: 

One thing that may be useful to note, is that when you change a user's group membership, you will have to log out and back in again (i.e. group memberships will take effect when you log in and don't normally change otherwise).

Adam Batkin
A: 

You can either log in and out to let the group change take effect, or changing your "active" group with the newgrp command will also do this for you.

Zenham