RE: [gentoo-user] Re: [OT apache Q] How to make apache display files in specific directories

2005-10-04 Thread Michael Cox
Make sure that your httpd/apache user has permissions to
/hpweb/TrainingVids/DigitalPhotography/ .

Michael Cox


-Original Message-
From: news [mailto:[EMAIL PROTECTED] On Behalf Of Harry Putnam
Sent: Tuesday, October 04, 2005 12:12 PM
To: gentoo-user@lists.gentoo.org
Subject: [gentoo-user] Re: [OT apache Q] How to make apache display files in
specific directories

Catalin Trifu [EMAIL PROTECTED] writes:

Option Indexes

 Harry Putnam wrote:

I seem to recall some trick stuff done with .htaccess or the like that
would cause apache to be able to display any files appearing in a
directory when someone hit www.myhost.org/somedir

 Anyone here know how that is done? 

Thanks, but I'm not getting how its done.  Consulting the apache
manual online I ended up thinking something like this should work in
/etc/apache2/conf/commonapache2.conf.  The plus sign is supposed to
mean it will merge onto other directory entries.

  Directory /hpweb/TrainingVids/DigitalPhotography
Options +Indexes
  /Directory

There is another Directory entry in that stock file right above where
I inserted mine that looks like:

  Directory /
Options -All -Multiviews
AllowOverride None
IfModule mod_access.c
  Order deny,allow
  Deny from all
/IfModule
  /Directory

I thought maybe the minus sign on All would mean it was ruled out for
all options, so changed it to +.  It didn't work either way after 
  `/etc/init.d/apache2 restart'

The error is:

You don't have permission to access
/hpweb/TrainingVids/DigitalPhotography/ on this server.

However that directory has the same permissions as all others. (my
user)


 

-- 
gentoo-user@gentoo.org mailing list

-- 
gentoo-user@gentoo.org mailing list



Re: [gentoo-user] Re: [OT apache Q] How to make apache display files in specific directories

2005-10-04 Thread Michael Crute
On 10/4/05, Harry Putnam [EMAIL PROTECTED] wrote:
 You don't have permission to access /hpweb/TrainingVids/DigitalPhotography/ 
 on this server.

 However that directory has the same permissions as all others. (my
 user)




Are you sure that it has execute permissions for everyone?

-Mike

--

Michael E. Crute
Software Developer
SoftGroup Development Corporation

Linux, because reboots are for installing hardware.
In a world without walls and fences, who needs windows and gates?

-- 
gentoo-user@gentoo.org mailing list



Re: [gentoo-user] Re: [OT apache Q] How to make apache display files in specific directories

2005-10-04 Thread Mike Williams
On Tuesday 04 October 2005 17:23, Michael Cox wrote:
 You don't have permission to access
 /hpweb/TrainingVids/DigitalPhotography/ on this server.

 However that directory has the same permissions as all others. (my
 user)

Put the All back as it was, and add an IfModule mod_access.c section to 
allow from all.
The / Directory definition is preventing apache from accessing anything, later 
Directory definitions allow it access to specific directories.

-- 
Mike Williams
-- 
gentoo-user@gentoo.org mailing list



Re: [gentoo-user] Re: [OT apache Q] How to make apache display files in specific directories

2005-10-04 Thread Michael Crute
On 10/4/05, Harry Putnam [EMAIL PROTECTED] wrote:
 It looks like this:
  reader  ls -ld /var/www/localhost/htdocs/hpweb/\
  TrainingVids/DigitalPhotography/
  drwxrwxrwx  9 reader users 392 Oct  4 11:15 \
  /var/www/localhost/htdocs/hpweb/TrainingVids/DigitalPhotography/

 Should it be something else?

Well its probably further up the tree. Check the perms for
TrainingVids and hpweb.

-Mike

--

Michael E. Crute
Software Developer
SoftGroup Development Corporation

Linux, because reboots are for installing hardware.
In a world without walls and fences, who needs windows and gates?

-- 
gentoo-user@gentoo.org mailing list



Re: [gentoo-user] Re: [OT apache Q] How to make apache display files in specific directories

2005-10-04 Thread Michael Crute
On 10/4/05, James [EMAIL PROTECTED] wrote:
 Michael Crute mcrute at gmail.com writes:


   However that directory has the same permissions as all others. (my
   user)

  Are you sure that it has execute permissions for everyone?

 Um, here's a question. Does the 'apache' entry in /etc/group have
 anything to do with these permissions, in this circumstance?

 Where can I read more about how the /etc/group entry affects who can
 do what with apache2?

 Is there another file that gives greater  granularity of control over
 who can do what to an apache2 server?


The Apache process run as user apache(2?) and group apache so it will
only have access to directories owned by that user or group and who
have the appropriate permissions. The way my server is setup is that
the user who owns the vhost owns all the folders for that vhost then
the apache group also owns those folders and all files and folders
have 751 permissions. It looks something like:

var
L www
L vhost1 -- userb/apache (751)
L vhost 2 -- usera/apache (751)
L cgi-bin -- usera/apache (751)
L htdocs -- usera/apache (751)
|  L folder 1 -- usera/apache (751)
|  L folder 2 -- usera/apache (751)
|  L file 1 -- usera/apache (751)
L auth -- usera/apache (751)

Hopefully that explains what you are looking for, otherwise check out
the docs at httpd.apache.org for the rest of the story.

-Mike

--

Michael E. Crute
Software Developer
SoftGroup Development Corporation

Linux, because reboots are for installing hardware.
In a world without walls and fences, who needs windows and gates?

-- 
gentoo-user@gentoo.org mailing list