Help - Search - Members - Calendar
Full Version: Forbidden?
The Planet Forums > Security > General Security
korndragon
Hello, (again icon_biggrin.gif )
When i go to view a picture in a directory it comes up saying "You don't have permission to access /directory/image.gif on this server." I figured this is feature apache has to keep ppl from getting directory listings.. but how do i turn this off?
Creator
Actually, by default you and anyone else should be able to see an image file by using the URL directly, unless you manually restricted it yourself through perhaps an htaccess file, for example. Are you sure you are entering the correct URL to the image? Maybe the image file is not actually there which causes the Apache error to show up, or maybe the image file is not in a public directory.
Cyborg
QUOTE
Originally posted by Creator
Maybe the image file is not actually there which causes the Apache error to show up, or maybe the image file is not in a public directory.
Or the permission isn't set right (directory and/or image)
Emerald
I'm having this same problem, but only for certian domains. When I create a directory the permissions are already set at 262 for some weird reason. When I CHMOD to 755 it comes up

Forbidden
You don't have permission to access /images/admin.gif on this server.

Any idea what is causing this or how to fix it? thanks
Emerald
month and a half and still haven't resolved this, can anyone help?

thanks
perldork
Hi,

If your default permissions are coming up 262 when you do a

mkdir somedir

then it sounds like your umask is off .. for root a typical value is

077

which means that by default a NEWLY CREATED file/directory will be writable/readable/executable by root but not by anyone else.

So I would check that setting ..

# umask

You can set it by passing it the mask you want

# umask 077

If you su to root your umask value will be inherited from the account you su'd from unless you do

bash$ su - root

In which case your root accounts' startup files will set the environment.

What are the permissions on the gif you are trying to view from the web client?

Also, make sure the PARENT directory to the directory you have created also has permissions that are lenient enough to allow the web server to read it (755).
This is a "lo-fi" version of our main content. To view the full version with more information, formatting and images, please click here.
Invision Power Board © 2001-2010 Invision Power Services, Inc.