Download your favorite Linux distribution at LQ ISO.
Go Back > Forums > Linux Forums > Linux - Software
User Name
Linux - Software This forum is for Software issues.
Having a problem installing a new program? Want to know which application is best for the job? Post your question in this forum.


  Search this Thread
Old 03-07-2005, 02:16 PM   #1
Registered: Oct 2004
Posts: 76

Rep: Reputation: 15
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:

-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!

Old 03-07-2005, 02:59 PM   #2
Andrew Benton
Senior Member
Registered: Aug 2003
Location: Birkenhead/Britain
Distribution: Linux From Scratch
Posts: 2,073

Rep: Reputation: 64
Directories (folders) need execute permission for users to be able to see what's inside them so chmod 644 is not enough.
find /path/to/htdocs -type d -exec chmod 755 {} \; &&
find /path/to/htdocs -type f -exec chmod 644 {} \;
Old 03-07-2005, 05:10 PM   #3
Registered: Oct 2004
Posts: 76

Original Poster
Rep: Reputation: 15
Hi Andrew,

Thanks that indeed was the problem. I had forgoten that folders need execute permissions.



Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off

Similar Threads
Thread Thread Starter Forum Replies Last Post
[SOLVED] noob with httpd-access.log (Attempting to Crack me?) kwlskwlguy Linux - Security 6 08-10-2005 07:47 AM
Error when attempting to compile kernel SMurf7 Debian 3 04-05-2005 06:31 PM
Web-access image gallery software? gypsy_rabbi Linux - Software 2 09-17-2004 12:48 PM
Attempting to access beyond end of device? MasterC Linux - Hardware 13 01-29-2003 06:57 AM
Exchange2000 WEB access error zdenkod Linux - Security 0 02-01-2002 05:54 AM > Forums > Linux Forums > Linux - Software

All times are GMT -5. The time now is 06:11 AM.

Main Menu
Write for LQ is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration