Re: permissions for www acting strangely

2007-11-19 Thread Warren Block

On Mon, 19 Nov 2007, Steve Franks wrote:


Few weeks ago, I installed apache22.  Just wanted to put up some
family photos.  Whenever I tried to connect, got a "apache doesn't
have permisson to acess ~/. on this system or somesuch".  The only way
to get around it appeared to be a chmod 777 on my pic folder (no luck
with 775!).  Now I restored some stuff from a backup over my photos,
and now 777 won't work either.  Is there something fundamental about
permissions I am totally missing?


Assuming you're talking about bare directory access (not HTML), have you 
uncommented this line in httpd.conf:


Include etc/apache22/extra/httpd-userdir.conf

-Warren Block * Rapid City, South Dakota USA
___
freebsd-questions@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-questions
To unsubscribe, send any mail to "[EMAIL PROTECTED]"


Re: permissions for www acting strangely

2007-11-19 Thread Peter Boosten
On Mon, November 19, 2007 18:42, Peter Boosten wrote:

> I suppose ~/ is your html_public in your homedir, right?

Make that public_html (it has been a long time since I did something with
userdirs).

Peter


-- 
http://www.boosten.org

___
freebsd-questions@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-questions
To unsubscribe, send any mail to "[EMAIL PROTECTED]"


Re: permissions for www acting strangely

2007-11-19 Thread Laszlo Nagy

Steve Franks wrote:

Few weeks ago, I installed apache22.  Just wanted to put up some
family photos.  Whenever I tried to connect, got a "apache doesn't
have permisson to acess ~/. on this system or somesuch".  The only way
to get around it appeared to be a chmod 777 on my pic folder (no luck
with 775!).  Now I restored some stuff from a backup over my photos,
and now 777 won't work either.  Is there something fundamental about
permissions I am totally missing?
  
Look at your apache config file. Most probably, 
/usr/local/etc/apache22/httpd.conf.


Look for "User" and "Group" options - it tells you the user and group 
apache is running under.


Now look at the ownership of your files and directories. Apache needs to 
have rx on directories and r on file to read them.


One common approach for this problem is to set the "set group id" bit on 
your folder containing your photos, and do


chown user1:group1 -R yourfolder


Where:

   user1- can be you (?)
   group1 - should be the group apache is running under


Well, it is just a bad example. You need to develop your own strategy 
for security. They key is that you also need to check ownership. It is 
not enough to chmod, sometimes you need to chown.


Best,

  Laszlo


___
freebsd-questions@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-questions
To unsubscribe, send any mail to "[EMAIL PROTECTED]"


Re: permissions for www acting strangely

2007-11-19 Thread Peter Boosten
On Mon, November 19, 2007 18:35, Steve Franks wrote:
> Few weeks ago, I installed apache22.  Just wanted to put up some
> family photos.  Whenever I tried to connect, got a "apache doesn't have
> permisson to acess ~/. on this system or somesuch".  The only way to get
> around it appeared to be a chmod 777 on my pic folder (no luck with 775!).
> Now I restored some stuff from a backup over my photos,
> and now 777 won't work either.  Is there something fundamental about
> permissions I am totally missing?
>

Steve,

I suppose ~/ is your html_public in your homedir, right?
Apache runs as user www (and group www). So this user needs one way or the
other access to the mentioned directory (read and execute = 5).

Could it be that access is blocked on a higher level, say your homedir?

Peter


-- 
http://www.boosten.org

___
freebsd-questions@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-questions
To unsubscribe, send any mail to "[EMAIL PROTECTED]"


permissions for www acting strangely

2007-11-19 Thread Steve Franks
Few weeks ago, I installed apache22.  Just wanted to put up some
family photos.  Whenever I tried to connect, got a "apache doesn't
have permisson to acess ~/. on this system or somesuch".  The only way
to get around it appeared to be a chmod 777 on my pic folder (no luck
with 775!).  Now I restored some stuff from a backup over my photos,
and now 777 won't work either.  Is there something fundamental about
permissions I am totally missing?

Thanks,
Steve
___
freebsd-questions@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-questions
To unsubscribe, send any mail to "[EMAIL PROTECTED]"