Permission error attempting to access a web image
Hi everyone,
All along I have been developing a web site on my Windows XP box and then testing it on my Linux box. I had directories of the same names and folder hierarchy on both systems and would just copy the files from their current directory onto their synonymous directories on the Linux system. I could see the images and PHP files just fine. Finally I got my site "finished" and decided to delete the testing directory on the Linux server and copy a fresh version of all the most recent files. It seems that this process has caused permission errors that chmod 644 can't fix. I get the current error if I try to view one of the web images in a browser: You don't have permission to access /Images/Web-Logo.gif on this server The structure of the site inside Htdocs is: Htdocs -rwxr-xr-x- Site_folder --rwxr-xr-x--- images --rwxr-r-- -------- Web-Logo.gif --rwxr-xr-x--- includes -rwxr-r-- -- file1.php -rwxr-r-- -- file2.php I had a similar problem with one of the include file but setting chmod 644 on the file in question resolved the issue. I have set chmod 644 on the images directory and the Web-Logo.gif and still I get the permissions error. Does anyone have any idea what is happening as I have tried to take this back to the same situation that I had when I had the test directories but I can't seem to get it right. I would kindly like you help on this one. Any suggestions are welcomed! Truly, ServerStorm |
Directories (folders) need execute permission for users to be able to see what's inside them so chmod 644 is not enough.
Code:
find /path/to/htdocs -type d -exec chmod 755 {} \; && |
Hi Andrew,
Thanks that indeed was the problem. I had forgoten that folders need execute permissions. Cheers, ServerStorm |
All times are GMT -5. The time now is 04:56 PM. |