Unix & Linux Stack Exchange is a question and answer site for users of Linux, FreeBSD and other Un*x-like operating systems. Join them; it only takes a minute:

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

I want to see apache log file. This is what I tried:

I granted most all permissions to apache2 folder.

hieund@hieund:/var/log$ sudo chmod a+rw apache2/*

But I can't cd to it. So I add my user to group "root", "adm"

hieund@hieund:/var/log$ groups hieund
hieund : hieund root adm sudo www-data

But I still can't... It shows:

hieund@hieund:/var/log$ cd apache2/
bash: cd: apache2/: Permission denied
drwxrwxrw- 2 root              adm     4096 2011-11-27 11:12 apache2

I'm so confused about it. How to see log files?

share|improve this question

You need to logout and back in after adding yourself to a group for the change to take effect.

You should change the permissions back to the default and then being in the adm group will give you permission to view the files.

share|improve this answer

you have to have execute rights to access a directory. try setting +x for all users. it should work.

but you should probably set the dir to the defaults, because it's a security risk to have 0777 on such a dir.

share|improve this answer

Your Answer


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.