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

2005-10-04 Thread Harry Putnam
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



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



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

2005-10-04 Thread Harry Putnam
Mike Williams [EMAIL PROTECTED] writes:

 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.

I'm guessing you mean that besides fixing +All back to -All in the
stock Directory entry I am to add that IfModule to the new Directory
entry I've posted like this:

 Directory /hpweb/TrainingVids/DigitalPhotography
  Options +Indexes
   IfModule mod_access.c
 Order deny,allow
 Allow from all
   /IfModule
 /Directory

Doing it like that has changed nothing after a restart.

I still get the forbidden error:

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

-- 
gentoo-user@gentoo.org mailing list



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

2005-10-04 Thread James
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?


James


-- 
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



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

2005-10-04 Thread Harry Putnam
Michael Crute [EMAIL PROTECTED] writes:

 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)



This may be my problem.  I don't have anything owned by apache.  Yet
my webpages work ok.  Its just getting the directory listing machinery
to work that fails.

All www/localhost/htdocs/hpweb is chowned reader:users (my user).

I don't recall having to chown things over to apache in the past to
get this to work.

-- 
gentoo-user@gentoo.org mailing list



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

2005-10-04 Thread Harry Putnam
Harry Putnam [EMAIL PROTECTED] writes:

 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

Posting on the apache list got me an answer that seems to have solved
this.

It turns out that `Directory' refers to filesystem directories not
webroot.

I took the / in the original Directory entry to be a refernce
/var/www/localhost/htdocs  not to actual / (root) of fs.

So adding the rest of the path: 

  /var/www/localhost/htdocs/hpweb/TrainingVids/DigitalPhotography

Makes it work.  The whole entry now looks like:

  Directory /var/www/localhost/htdocs/hpweb
Options +All
IfModule mod_access.c
  Order deny,allow
  Allow from all
/IfModule
  /Directory

I wanted All options turned on (which includes Indexes) since this
server only sees requests from local home lan.

Also I noticed that just including the parent dir is enough.
That is, just `[...]/hpweb' not hpweb/TrainingVids/DigitalPhotography

-- 
gentoo-user@gentoo.org mailing list



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

2005-10-04 Thread Harry Putnam
Harry Putnam [EMAIL PROTECTED] writes:

 Also I noticed that just including the parent dir is enough.
 That is, just `[...]/hpweb' not hpweb/TrainingVids/DigitalPhotography

Slight correction here...
The only reason above worked was because I had edited -All to +All in
main `Directory' entry.

Once the main directory entry was set to block all directories as
intended it is then necessary to specify exactly which dir at what
depth you want to change.

-- 
gentoo-user@gentoo.org mailing list