amuck-landowner

File system problem

patz

New Member
I setup a small web project in an ubuntu 12.04.2 vps. I have rw rights in project's folder.

I tried to cd to it and I got this:


cd project

-bash: cd: project/: Permission denied

I then tried to get it's file list.


ls -l project/

ls: cannot access project/index.php: Permission denied
ls: cannot access project/css: Permission denied
ls: cannot access project/.: Permission denied
ls: cannot access project/images: Permission denied
ls: cannot access project/themes: Permission denied
ls: cannot access project/..: Permission denied
ls: cannot access project/protected: Permission denied
ls: cannot access project/index-test.php: Permission denied
ls: cannot access project/assets: Permission denied
total 0
d????????? ? ? ? ? ? .
d????????? ? ? ? ? ? ..
d????????? ? ? ? ? ? assets
d????????? ? ? ? ? ? css
d????????? ? ? ? ? ? images
-????????? ? ? ? ? ? index.php
-????????? ? ? ? ? ? index-test.php
d????????? ? ? ? ? ? protected
d????????? ? ? ? ? ? themes

I tried again as root and got this.


ls -al
total 36
drw-rw-r-x 7 www-data www-data 4096 Aug 31 11:34 .
drwxr-xr-x 5 root root 4096 Aug 31 11:34 ..
drw-rw-r-- 6 www-data www-data 4096 Aug 31 12:47 assets
drw-rw-r-- 2 www-data www-data 4096 Aug 31 11:34 css
drw-rw-r-- 2 www-data www-data 4096 Aug 31 11:34 images
-rw-rw-r-- 1 www-data www-data 463 Aug 31 11:34 index.php
-rw-rw-r-- 1 www-data www-data 466 Aug 31 11:34 index-test.php
drw-rw-r-- 16 www-data www-data 4096 Sep 11 13:49 protected
drw-rw-r-- 3 www-data www-data 4096 Aug 31 11:34 themes

I copied the project's folder to my home folder, changed ownership to me and tried again as regular user. Still no luck. I could not cd in the folder and got those same ?s instead of file attributes.

Have you any suggestion on what to do to fix this problem?
 

WebSearchingPro

VPS Peddler
Verified Provider
You need execute permissions on the folder for the user to be able to enter the folder as well as list the contents. 

You only have read and write on the folder.
 

patz

New Member
You need execute permissions on the folder for the user to be able to enter the folder as well as list the contents. 

You only have read and write on the folder.
This did the trick. It was me that had messed things up afterall.

Thanks for your answers.
 
Last edited by a moderator:

Shados

Professional Snake Miner
Also, if you ever need to set execute permissions on only directories, you can use +X.
 
Top
amuck-landowner