PHWinfo banniere

Titres
PORTAIL ANNUAIRE ARTICLES COMPARATEUR HÉBERGEURS DEVIS FORUMS RÉDUCTEUR D'URL
Précédent   PHWinfo > Forums Hébergement > Forum Serveur - Sécurité et techniques > alt.apache.configuration > Permission Problems
S'inscrire FAQ Membres Recherche Messages du jour Marquer les forums comme lus
alt.apache.configuration Apache web server configuration issues.

Permission Problems

Réponse
 
LinkBack Outils de la discussion
Vieux 11/02/2007, 21h38   #1
Stephane M
Aucun Avatar
 
Messages: n/a
Hébergeur:
Par défaut Permission Problems

Hi,

Since I have a multi web hosting, I can't browse all my directories
All my directories have the right permissions....
When I tried to connect I have :

[Sun Feb 11 20:46:25 2007] [error] [client 192.168.9.2] Directory index
forbidden by rule: /home/toto/support/download/

I can display correctly all HTML pages, but cannot display a folder content.

Using a Vistualhost -> Directory : /home/toto
I suspect that I have to add some directive like
AllowOverride None
(I add this in to my virtual host, but wihtout any success...)
I am not sure of what I need to add exactly

- Should I add something into the Main config section ? or should I add
something in each Virtualhost section ?

Thanks for your

Stephane
  Réponse avec citation
Vieux 11/02/2007, 21h54   #2
shimmyshack
Aucun Avatar
 
Messages: n/a
Hébergeur:
Par défaut Re: Permission Problems

On 11 Feb, 21:38, Stephane M <Steph...@M.com> wrote:
> Hi,
>
> Since I have a multi web hosting, I can't browse all my directories
> All my directories have the right permissions....
> When I tried to connect I have :
>
> [Sun Feb 11 20:46:25 2007] [error] [client 192.168.9.2] Directory index
> forbidden by rule: /home/toto/support/download/
>
> I can display correctly all HTML pages, but cannot display a folder content.
>
> Using a Vistualhost -> Directory : /home/toto
> I suspect that I have to add some directive like
> AllowOverride None
> (I add this in to my virtual host, but wihtout any success...)
> I am not sure of what I need to add exactly
>
> - Should I add something into the Main config section ? or should I add
> something in each Virtualhost section ?
>
> Thanks for your
>
> Stephane


Options +Indexes

in your vhost, or better in a httpd-per-directory.conf file
which you include in your main conf.

if you have alot of vhosts they will get cluttered, and unless
you _really_ want to enable this site-wide you should limit it to
only the directory in question, (not forgetting that you will have
to override it to turn it off in all subdirectories)

having indexes switched off s prevent path traversal attacks,
where the attacker guesses about your OS and therefore how to attack
it based on the setup of directories, and also knows where to aim
for if they get the chance.

  Réponse avec citation
Vieux 11/02/2007, 22h17   #3
Stephane M
Aucun Avatar
 
Messages: n/a
Hébergeur:
Par défaut Re: Permission Problems

shimmyshack a écrit :
> On 11 Feb, 21:38, Stephane M <Steph...@M.com> wrote:
>> Hi,
>>
>> Since I have a multi web hosting, I can't browse all my directories
>> All my directories have the right permissions....
>> When I tried to connect I have :
>>
>> [Sun Feb 11 20:46:25 2007] [error] [client 192.168.9.2] Directory index
>> forbidden by rule: /home/toto/support/download/
>>
>> I can display correctly all HTML pages, but cannot display a folder content.
>>
>> Using a Vistualhost -> Directory : /home/toto
>> I suspect that I have to add some directive like
>> AllowOverride None
>> (I add this in to my virtual host, but wihtout any success...)
>> I am not sure of what I need to add exactly
>>
>> - Should I add something into the Main config section ? or should I add
>> something in each Virtualhost section ?
>>
>> Thanks for your
>>
>> Stephane

>
> Options +Indexes
>
> in your vhost, or better in a httpd-per-directory.conf file
> which you include in your main conf.
>
> if you have alot of vhosts they will get cluttered, and unless
> you _really_ want to enable this site-wide you should limit it to
> only the directory in question, (not forgetting that you will have
> to override it to turn it off in all subdirectories)
>
> having indexes switched off s prevent path traversal attacks,
> where the attacker guesses about your OS and therefore how to attack
> it based on the setup of directories, and also knows where to aim
> for if they get the chance.
>


But with Options +Indexes, Can I just allow a specific directory ?

I don't want to show all my directories..
For each VirtualHost, I just need to allow 1 directory for downloading....

Should be quite secure ??
  Réponse avec citation
Vieux 11/02/2007, 22h50   #4
shimmyshack
Aucun Avatar
 
Messages: n/a
Hébergeur:
Par défaut Re: Permission Problems

On 11 Feb, 22:17, Stephane M <Steph...@M.com> wrote:
> shimmyshack a écrit :
>
>
>
> > On 11 Feb, 21:38, Stephane M <Steph...@M.com> wrote:
> >> Hi,

>
> >> Since I have a multi web hosting, I can't browse all my directories
> >> All my directories have the right permissions....
> >> When I tried to connect I have :

>
> >> [Sun Feb 11 20:46:25 2007] [error] [client 192.168.9.2] Directory index
> >> forbidden by rule: /home/toto/support/download/

>
> >> I can display correctly all HTML pages, but cannot display a folder content.

>
> >> Using a Vistualhost -> Directory : /home/toto
> >> I suspect that I have to add some directive like
> >> AllowOverride None
> >> (I add this in to my virtual host, but wihtout any success...)
> >> I am not sure of what I need to add exactly

>
> >> - Should I add something into the Main config section ? or should I add
> >> something in each Virtualhost section ?

>
> >> Thanks for your

>
> >> Stephane

>
> > Options +Indexes

>
> > in your vhost, or better in a httpd-per-directory.conf file
> > which you include in your main conf.

>
> > if you have alot of vhosts they will get cluttered, and unless
> > you _really_ want to enable this site-wide you should limit it to
> > only the directory in question, (not forgetting that you will have
> > to override it to turn it off in all subdirectories)

>
> > having indexes switched off s prevent path traversal attacks,
> > where the attacker guesses about your OS and therefore how to attack
> > it based on the setup of directories, and also knows where to aim
> > for if they get the chance.

>
> But with Options +Indexes, Can I just allow a specific directory ?
>
> I don't want to show all my directories..
> For each VirtualHost, I just need to allow 1 directory for downloading....
>
> Should be quite secure ??



I see, I did this by using an alias like so: (so that all my
virtualhosts can share the download folder)
Alias /downloads "/usr/local/apache2/vhosts/private/downloads"
<Directory "/usr/local/apache2/vhosts/private/downloads">
Options +Indexes +FollowSymLinks
IndexOrderDefault Ascending Description
IndexOptions +FancyIndexing -IconsAreLinks +FoldersFirst
+NameWidth=* +IgnoreCase +SuppressDescription +SuppressHTMLPreamble
+SuppressColumnSorting
AllowOverride None
# Order deny,allow
# Deny from bandwidth_slurping_bots
</Directory>

then whenever someone requests

http://sub1.server.com/downloads/
or
http://sub2.server.com/downloads/
etc...
they all get redirected to the folder which does alllow indexing.
The virtual hosts remain unaffected by the +indexes rules, and there
is no subdirectory of the downloads folder.
I put these rules in a httpd-autoindex.conf file - where all the
indexed directories live, so I can check through them to make sure
they are all secure.

Is that what you need?

  Réponse avec citation
Vieux 12/02/2007, 06h36   #5
Stephane M
Aucun Avatar
 
Messages: n/a
Hébergeur:
Par défaut Re: Permission Problems

shimmyshack a écrit :
> On 11 Feb, 22:17, Stephane M <Steph...@M.com> wrote:
>> shimmyshack a écrit :
>>
>>
>>
>>> On 11 Feb, 21:38, Stephane M <Steph...@M.com> wrote:
>>>> Hi,
>>>> Since I have a multi web hosting, I can't browse all my directories
>>>> All my directories have the right permissions....
>>>> When I tried to connect I have :
>>>> [Sun Feb 11 20:46:25 2007] [error] [client 192.168.9.2] Directory index
>>>> forbidden by rule: /home/toto/support/download/
>>>> I can display correctly all HTML pages, but cannot display a folder content.
>>>> Using a Vistualhost -> Directory : /home/toto
>>>> I suspect that I have to add some directive like
>>>> AllowOverride None
>>>> (I add this in to my virtual host, but wihtout any success...)
>>>> I am not sure of what I need to add exactly
>>>> - Should I add something into the Main config section ? or should I add
>>>> something in each Virtualhost section ?
>>>> Thanks for your
>>>> Stephane
>>> Options +Indexes
>>> in your vhost, or better in a httpd-per-directory.conf file
>>> which you include in your main conf.
>>> if you have alot of vhosts they will get cluttered, and unless
>>> you _really_ want to enable this site-wide you should limit it to
>>> only the directory in question, (not forgetting that you will have
>>> to override it to turn it off in all subdirectories)
>>> having indexes switched off s prevent path traversal attacks,
>>> where the attacker guesses about your OS and therefore how to attack
>>> it based on the setup of directories, and also knows where to aim
>>> for if they get the chance.

>> But with Options +Indexes, Can I just allow a specific directory ?
>>
>> I don't want to show all my directories..
>> For each VirtualHost, I just need to allow 1 directory for downloading....
>>
>> Should be quite secure ??

>
>
> I see, I did this by using an alias like so: (so that all my
> virtualhosts can share the download folder)
> Alias /downloads "/usr/local/apache2/vhosts/private/downloads"
> <Directory "/usr/local/apache2/vhosts/private/downloads">
> Options +Indexes +FollowSymLinks
> IndexOrderDefault Ascending Description
> IndexOptions +FancyIndexing -IconsAreLinks +FoldersFirst
> +NameWidth=* +IgnoreCase +SuppressDescription +SuppressHTMLPreamble
> +SuppressColumnSorting
> AllowOverride None
> # Order deny,allow
> # Deny from bandwidth_slurping_bots
> </Directory>
>
> then whenever someone requests
>
> http://sub1.server.com/downloads/
> or
> http://sub2.server.com/downloads/
> etc...
> they all get redirected to the folder which does alllow indexing.
> The virtual hosts remain unaffected by the +indexes rules, and there
> is no subdirectory of the downloads folder.
> I put these rules in a httpd-autoindex.conf file - where all the
> indexed directories live, so I can check through them to make sure
> they are all secure.
>
> Is that what you need?
>


Yes, that is what I need
Thank you !!!
  Réponse avec citation
Réponse


Outils de la discussion

Règles de messages
Vous ne pouvez pas créer de nouvelles discussions
Vous ne pouvez pas envoyer des réponses
Vous ne pouvez pas envoyer des pièces jointes
Vous ne pouvez pas modifier vos messages

Les balises BB sont activées : oui
Les smileys sont activés : oui
La balise [IMG] est activée : oui
Le code HTML peut être employé : non
Trackbacks are oui
Pingbacks are oui
Refbacks are oui


Fuseau horaire GMT +1. Il est actuellement 22h20.


Édité par : vBulletin® version 3.7.3
Copyright ©2000 - 2008, Jelsoft Enterprises Ltd.
Search Engine Friendly URLs by vBSEO 3.2.0 RC5 Tous droits réservés.
Version française #16 par l'association vBulletin francophone
PHWinfo est un site Éducation Sans Frontières ©2000-2008
Ad Management by RedTyger
©Tous droits réservés par les parties respectives
Page generated in 0,16209 seconds with 13 queries