• Please review our updated Terms and Rules here

Apache HTTPd giving 403 on files

linuxlove

Veteran Member
Joined
Jan 11, 2009
Messages
1,018
Location
Auburn, AL
I tried putting some new images in my /images/ directory. I did the usual of getting root access and then "chmod -Rv *" in the /images/ directory. Now if i type in the HTTP address of one of the new pictures, it gives me "403 Forbidden". Does anyone know what is going on or am I just not doing things right?
 
403 is usually down to file permissions and there may be details in the error log. Your chmod command doesn't look right; the actual permissions are missing. Something like chmod -R 755 images should be fine in most cases. Check that the user under which Apache is running also has access to all the parent directories (e.g. if you're talking about a directory /usr/local/apache/htdocs/images, the user must be able to read /usr/local/apache/htdocs, /usr/local/apache and so on, right down to the root).
 
yes, you're right; i accidently left off the 755 in the CHMOD command. When I do it though, it says that "Permissions retained as 755" for the new pictures. If i try to go to them, it gives the 403 error.
 
@linuxlove:
since you used '*' (star) as the only wildcard, your probably changed the permission on the directory ('.') too.
Better check that:
Code:
ls -la .
and see what the entries for current ('.') and parent ('..') directory says.
 
[root@launchmodem images]# ls -la .
total 22924
drwxr-xr-x 20 server root 4096 Sep 29 22:14 .
drwxr-xr-x 17 root root 4096 Sep 30 14:17 ..
 
Well, to me that looks like a request to browse a directory. That may be disabled by settings within httpd.conf. There is nothing in the images directory called vcr either. Is this a virtual file/directory?
 
Back
Top