Why can't I view a directory in Linux?
Posted
by
Thread7
on Stack Overflow
See other posts from Stack Overflow
or by Thread7
Published on 2012-10-25T04:55:37Z
Indexed on
2012/10/25
5:00 UTC
Read the original article
Hit count: 115
linux
I am setting up a Linux web server running apache. I uploaded and untared my web sites files. The files in the main directory are all visible when I am SSH'd into the system. However, I am blocked from all subdirectories. If I write:
# cd images
Then I get the error:
-bash: cd: images: Permission denied
I am signed in as ec2-user. I untarred the stuff as ec2-user and I doubt there was any permissions in the tar file since I created the archive on a Windows system. The weird thing is that I am the owner of this directory. Here is a snippet of the command: ls -l
drw-rw-r-- 19 ec2-user ec2-user 4096 May 4 04:09 images
When I do "sudo su" and then type the command cd images everything is fine. Why do I get "Permission denied" as ec2-user if I am the owner and have rw permission?
© Stack Overflow or respective owner