The permissions of phpMyPhotos cannot be determined.

Tim ignored_mailbox at yahoo.com.au
Wed Aug 2 05:45:40 UTC 2006


On Tue, 2006-08-01 at 20:02 -0400, Robert Cahn wrote:
> I downloaded some php code for an a little ap and put it
> in /var/www/html/phpMyPhotos.  When I tried to access
> http://localhost/phpMyPhotos I get 
> 
> Forbidden
> You don't have permission to access /phpMyPhotos on this server.

When <http://fedora.redhat.com/> springs back to life, have a look at
the FAQ for SELinux and Apache, if you've got SELinux enabled.  In the
meantime, you can try the httpd_selinux man file.

There's two things that immediately spring to mind:  The SELinux context
for the files you're trying to serve (see the -Z option in the ls man
file), and allowing scripts to run outside of a cgi-bin directory (an
Apache configuration option).

> I'm running as root so I did chown root:root phpMyPhotos.  When I do
> ls -l I get
> -rwxrwxr-x 1 root root  5482 Aug 18  2004 directory.php
> -rwxrwxr-x 1 root root  2584 Aug 18  2004 global.conf 
> -rwxrwxr-x 1 root root   532 Aug 18  2004 index.php

Who's running as root?  Yourself?  Bad idea.  Apache?  REALLY bad idea.

You should be logged in as yourself.  Apache should be running as
itself.  Files should have world readable permissions, and possibly
world executable permissions (where appropriate).  Directories should
have world readable and executable permissions.  Apache will then be
able to serve files that it doesn't own.

> When I write click on this folder in the folder view of the directory
> and go to permissions it says that they cannot be determined.  I'm
> stumped.  What do I need to do to establish ownership of this folder
> and the files in it?

Hmm, as root change ownership of your files back to yourself.  Then be
sure to peruse your files as yourself.  Work onwards from there.

-- 
(Currently running FC4, occasionally trying FC5.)

Don't send private replies to my address, the mailbox is ignored.
I read messages from the public lists.




More information about the fedora-list mailing list