1

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?

Jeff Schaller
  • 67,283
  • 35
  • 116
  • 255

2 Answers2

1

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.

Arrowmaster
  • 1,684
0

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.

SkaveRat
  • 3,947
  • 4
  • 22
  • 17