On an EC2 instance I have changed Apache's log location to a different directory than the default. This is so that I can hold the logs on a (non-boot, only data) EBS.
However, I can't cd
into the logs directory. It belongs to my user and has read permissions for everyone. I can't cat
the logs either (although with sudo it works and I can see that Apache is logging just fine).
$ ls -lh
total 4.0K
drw-rw-rw- 2 ubuntu ubuntu 4.0K 2011-05-15 14:52 apache
$ ls -lh apache/
ls: cannot access apache/error.log: Permission denied
ls: cannot access apache/access.log: Permission denied
total 0
-????????? ? ? ? ? ? access.log
-????????? ? ? ? ? ? error.log
$ cd apache
-bash: cd: apache: Permission denied
$ sudo ls -lh apache/
total 2.4M
-rw-r--r-- 1 ubuntu ubuntu 2.4M 2011-05-15 15:04 access.log
-rw-r--r-- 1 ubuntu ubuntu 27K 2011-05-15 15:00 error.log
This does not make any sense to me. Help?
Edit: the filesystem is ext4.