* [gentoo-user] [OT apache Q] How to make apache display files in specific directories
@ 2005-10-04 13:41 Harry Putnam
2005-10-04 14:29 ` Catalin Trifu
0 siblings, 1 reply; 15+ messages in thread
From: Harry Putnam @ 2005-10-04 13:41 UTC (permalink / raw
To: gentoo-user
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?
--
gentoo-user@gentoo.org mailing list
^ permalink raw reply [flat|nested] 15+ messages in thread
* Re: [gentoo-user] [OT apache Q] How to make apache display files in specific directories
2005-10-04 13:41 [gentoo-user] [OT apache Q] How to make apache display files in specific directories Harry Putnam
@ 2005-10-04 14:29 ` Catalin Trifu
2005-10-04 16:12 ` [gentoo-user] " Harry Putnam
0 siblings, 1 reply; 15+ messages in thread
From: Catalin Trifu @ 2005-10-04 14:29 UTC (permalink / raw
To: gentoo-user
[-- Attachment #1: Type: text/plain, Size: 278 bytes --]
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?
>
>
>
[-- Attachment #2: Type: text/html, Size: 750 bytes --]
^ permalink raw reply [flat|nested] 15+ messages in thread
* [gentoo-user] Re: [OT apache Q] How to make apache display files in specific directories
2005-10-04 14:29 ` Catalin Trifu
@ 2005-10-04 16:12 ` Harry Putnam
2005-10-04 16:23 ` Michael Cox
` (3 more replies)
0 siblings, 4 replies; 15+ messages in thread
From: Harry Putnam @ 2005-10-04 16:12 UTC (permalink / raw
To: gentoo-user
Catalin Trifu <catalin@isp-software.de> 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
^ permalink raw reply [flat|nested] 15+ messages in thread
* RE: [gentoo-user] Re: [OT apache Q] How to make apache display files in specific directories
2005-10-04 16:12 ` [gentoo-user] " Harry Putnam
@ 2005-10-04 16:23 ` Michael Cox
2005-10-04 16:40 ` Mike Williams
2005-10-04 16:41 ` Harry Putnam
2005-10-04 16:24 ` Michael Crute
` (2 subsequent siblings)
3 siblings, 2 replies; 15+ messages in thread
From: Michael Cox @ 2005-10-04 16:23 UTC (permalink / raw
To: gentoo-user
Make sure that your httpd/apache user has permissions to
/hpweb/TrainingVids/DigitalPhotography/ .
Michael Cox
-----Original Message-----
From: news [mailto:news@sea.gmane.org] 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 <catalin@isp-software.de> 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
^ permalink raw reply [flat|nested] 15+ messages in thread
* Re: [gentoo-user] Re: [OT apache Q] How to make apache display files in specific directories
2005-10-04 16:12 ` [gentoo-user] " Harry Putnam
2005-10-04 16:23 ` Michael Cox
@ 2005-10-04 16:24 ` Michael Crute
2005-10-04 17:48 ` James
2005-10-04 17:01 ` Catalin Trifu
2005-10-05 1:06 ` Harry Putnam
3 siblings, 1 reply; 15+ messages in thread
From: Michael Crute @ 2005-10-04 16:24 UTC (permalink / raw
To: gentoo-user
On 10/4/05, Harry Putnam <reader@newsguy.com> 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
^ permalink raw reply [flat|nested] 15+ messages in thread
* Re: [gentoo-user] Re: [OT apache Q] How to make apache display files in specific directories
2005-10-04 16:23 ` Michael Cox
@ 2005-10-04 16:40 ` Mike Williams
2005-10-04 17:08 ` Harry Putnam
2005-10-04 16:41 ` Harry Putnam
1 sibling, 1 reply; 15+ messages in thread
From: Mike Williams @ 2005-10-04 16:40 UTC (permalink / raw
To: gentoo-user
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
^ permalink raw reply [flat|nested] 15+ messages in thread
* [gentoo-user] Re: [OT apache Q] How to make apache display files in specific directories
2005-10-04 16:23 ` Michael Cox
2005-10-04 16:40 ` Mike Williams
@ 2005-10-04 16:41 ` Harry Putnam
2005-10-04 16:57 ` Michael Crute
1 sibling, 1 reply; 15+ messages in thread
From: Harry Putnam @ 2005-10-04 16:41 UTC (permalink / raw
To: gentoo-user
"Michael Cox" <michael@saline.lib.mi.us> writes:
> Make sure that your httpd/apache user has permissions to
> /hpweb/TrainingVids/DigitalPhotography/ .
[...]
> Are you sure that it has execute permissions for everyone?
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?
--
gentoo-user@gentoo.org mailing list
^ permalink raw reply [flat|nested] 15+ messages in thread
* Re: [gentoo-user] Re: [OT apache Q] How to make apache display files in specific directories
2005-10-04 16:41 ` Harry Putnam
@ 2005-10-04 16:57 ` Michael Crute
0 siblings, 0 replies; 15+ messages in thread
From: Michael Crute @ 2005-10-04 16:57 UTC (permalink / raw
To: gentoo-user
On 10/4/05, Harry Putnam <reader@newsguy.com> 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
^ permalink raw reply [flat|nested] 15+ messages in thread
* [gentoo-user] Re: [OT apache Q] How to make apache display files in specific directories
2005-10-04 16:12 ` [gentoo-user] " Harry Putnam
2005-10-04 16:23 ` Michael Cox
2005-10-04 16:24 ` Michael Crute
@ 2005-10-04 17:01 ` Catalin Trifu
2005-10-05 1:06 ` Harry Putnam
3 siblings, 0 replies; 15+ messages in thread
From: Catalin Trifu @ 2005-10-04 17:01 UTC (permalink / raw
To: gentoo-user
Which ebuild for apache do u use ?
The newest ebuilds have taken out some config files.
Check the /etc/conf.d/apache2 and see how it's started.
try /usr/sbin/apache2 -S to see which vhosts are defined and where.
If it's on the default vhost the:
<Directory />
Option Indexes FollowSymLinks
</Directory>
should do it.
Catalin
Harry Putnam wrote:
> Catalin Trifu <catalin@isp-software.de> 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
^ permalink raw reply [flat|nested] 15+ messages in thread
* [gentoo-user] Re: [OT apache Q] How to make apache display files in specific directories
2005-10-04 16:40 ` Mike Williams
@ 2005-10-04 17:08 ` Harry Putnam
0 siblings, 0 replies; 15+ messages in thread
From: Harry Putnam @ 2005-10-04 17:08 UTC (permalink / raw
To: gentoo-user
Mike Williams <mike@gaima.co.uk> 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
^ permalink raw reply [flat|nested] 15+ messages in thread
* [gentoo-user] Re: [OT apache Q] How to make apache display files in specific directories
2005-10-04 16:24 ` Michael Crute
@ 2005-10-04 17:48 ` James
2005-10-04 18:20 ` Michael Crute
0 siblings, 1 reply; 15+ messages in thread
From: James @ 2005-10-04 17:48 UTC (permalink / raw
To: gentoo-user
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
^ permalink raw reply [flat|nested] 15+ messages in thread
* Re: [gentoo-user] Re: [OT apache Q] How to make apache display files in specific directories
2005-10-04 17:48 ` James
@ 2005-10-04 18:20 ` Michael Crute
2005-10-05 0:33 ` Harry Putnam
0 siblings, 1 reply; 15+ messages in thread
From: Michael Crute @ 2005-10-04 18:20 UTC (permalink / raw
To: gentoo-user
On 10/4/05, James <wireless@tampabay.rr.com> 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
^ permalink raw reply [flat|nested] 15+ messages in thread
* [gentoo-user] Re: [OT apache Q] How to make apache display files in specific directories
2005-10-04 18:20 ` Michael Crute
@ 2005-10-05 0:33 ` Harry Putnam
0 siblings, 0 replies; 15+ messages in thread
From: Harry Putnam @ 2005-10-05 0:33 UTC (permalink / raw
To: gentoo-user
Michael Crute <mcrute@gmail.com> 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
^ permalink raw reply [flat|nested] 15+ messages in thread
* [gentoo-user] Re: [OT apache Q] How to make apache display files in specific directories
2005-10-04 16:12 ` [gentoo-user] " Harry Putnam
` (2 preceding siblings ...)
2005-10-04 17:01 ` Catalin Trifu
@ 2005-10-05 1:06 ` Harry Putnam
2005-10-05 3:14 ` Harry Putnam
3 siblings, 1 reply; 15+ messages in thread
From: Harry Putnam @ 2005-10-05 1:06 UTC (permalink / raw
To: gentoo-user
Harry Putnam <reader@newsguy.com> writes:
> Catalin Trifu <catalin@isp-software.de> 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
^ permalink raw reply [flat|nested] 15+ messages in thread
* [gentoo-user] Re: [OT apache Q] How to make apache display files in specific directories
2005-10-05 1:06 ` Harry Putnam
@ 2005-10-05 3:14 ` Harry Putnam
0 siblings, 0 replies; 15+ messages in thread
From: Harry Putnam @ 2005-10-05 3:14 UTC (permalink / raw
To: gentoo-user
Harry Putnam <reader@newsguy.com> 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
^ permalink raw reply [flat|nested] 15+ messages in thread
end of thread, other threads:[~2005-10-05 3:25 UTC | newest]
Thread overview: 15+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2005-10-04 13:41 [gentoo-user] [OT apache Q] How to make apache display files in specific directories Harry Putnam
2005-10-04 14:29 ` Catalin Trifu
2005-10-04 16:12 ` [gentoo-user] " Harry Putnam
2005-10-04 16:23 ` Michael Cox
2005-10-04 16:40 ` Mike Williams
2005-10-04 17:08 ` Harry Putnam
2005-10-04 16:41 ` Harry Putnam
2005-10-04 16:57 ` Michael Crute
2005-10-04 16:24 ` Michael Crute
2005-10-04 17:48 ` James
2005-10-04 18:20 ` Michael Crute
2005-10-05 0:33 ` Harry Putnam
2005-10-04 17:01 ` Catalin Trifu
2005-10-05 1:06 ` Harry Putnam
2005-10-05 3:14 ` Harry Putnam
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox