Linux permission group

I am trying to configure my web server so that one group has access to files. Apache and every user who needs to edit files will be part of this group. So I installed all the files for the psacln group. I added psacln to my groups. But it still will not allow me to view 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
...
+3
source share
2 answers

You may notice that when you change membership in a user group, you will have to log in again and again (for example, group membership will take effect when you log in and usually do not change otherwise).

+2
source

You can enter or exit for the group changes to take effect, or changing your “active” group with the newgrp command will also do this for you.

+1
source

Source: https://habr.com/ru/post/1713261/


All Articles