I have this directory:

drwxr-x--- 2 root adm 160 2011-08-18 02:13 apache2

Im belonging to the group adm but I can not access to the directory..It says: "Permission denied".

  • What is the entire path? if it's /home/apache2 you'll need 770 from /home on up. – NickW Jun 14 '13 at 15:30
  • it is /var/log/apache2 – user35538 Jun 14 '13 at 15:30
  • what are you trying to do to the directory? – NickW Jun 14 '13 at 15:32
  • I just want to print the apache log using "tail -f /var/log/apache2/error.log" – user35538 Jun 14 '13 at 15:32
  • 2
    There you are then, it's the permissions on error.log. Try doing sudo ls -all or su'ing up to root – NickW Jun 14 '13 at 15:41

After you are added to a group, you will need to log out, then in again, or do an su - <yourusername> to get the system to recognize your new privileges.


Or you have a group created in an ldap back-end that has the same name as a group in /etc/group. Spottable with numeric group ids.


talcom@plato:/home/smb$ ls -lah /home/smb/
drwxrws---  2 root staff      4.0K Mar 17 19:43 scans
drwxrws--- 14 root staff      4.0K Mar 29 11:41 staff

Revealed! ...

talcom@plato:/home/smb$ ls -lahn /home/smb/
drwxrws---  2 0 5076 4.0K Mar 17 19:43 scans
drwxrws--- 14 0   50 4.0K Mar 29 11:41 staff

Also, if you're really silly and create duplicate group names in /etc/group, and you're only a member of one of the copies, then you can appear to be in the group when running the id command, but the directory may actually belong to the other group.

  • 1
    I would definitely never edit the group file by hand, so I couldn't possibly have actually happened to me – Brad Mace Jan 18 '18 at 21:33

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

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