Dear all,

I am using Apache/2.4.10 (Debian). Following the Apache documentation, I am 
trying to configure my server using DirectoryMatch. I get the expected behavior 
concerning the directories I want to handle (only user whose name is the same 
as the directory name can access to the directory). However I cannot access to 
the parent directory ("/var/www/html/webdav/directories/” in the example below) 
getting an “401 Unauthorized”. Changing the dynamic ldap user  
“%{env:MATCH_DIRECTORYNAME}” by a specific user allows me to access to 
"/var/www/html/webdav/directories/”. It seems to me that 
"/var/www/html/webdav/directories/” matches the regex I defined which should 
not be the case ! I have added “[a-z]” to be sure not to match the regex but it 
does not solve my problem.

Please find below my configuration:

<DirectoryMatch 
"^/var/www/html/webdav/directories/(?<directoryname>[a-z][^/]+)">
    Dav On
    AuthName "Authentication required"
    AuthType Basic
    AuthBasicProvider ldap
    AuthLDAPURL <url>

    <Limit GET PUT POST DELETE PROPFIND PROPPATCH MKCOL COPY MOVE LOCK UNLOCK 
OPTIONS>
      Require ldap-user %{env:MATCH_DIRECTORYNAME}
    </Limit>
  </DirectoryMatch>

Any hints welcome,
Thanks in advance,
Fanny

Ce message et toutes les pièces jointes (ci-après le "message") sont établis à 
l’intention exclusive des destinataires désignés. Il contient des informations 
confidentielles et pouvant être protégé par le secret professionnel. Si vous 
recevez ce message par erreur, merci d'en avertir immédiatement l'expéditeur et 
de détruire le message. Toute utilisation de ce message non conforme à sa 
destination, toute diffusion ou toute publication, totale ou partielle, est 
interdite, sauf autorisation expresse de l’émetteur. L'internet ne garantissant 
pas l'intégrité de ce message lors de son acheminement, Atos (et ses filiales) 
décline(nt) toute responsabilité au titre de son contenu. Bien que ce message 
ait fait l’objet d’un traitement anti-virus lors de son envoi, l’émetteur ne 
peut garantir l’absence totale de logiciels malveillants dans son contenu et ne 
pourrait être tenu pour responsable des dommages engendrés par la transmission 
de l’un d’eux.

This message and any attachments (the "message") are intended solely for the 
addressee(s). It contains confidential information, that may be privileged. If 
you receive this message in error, please notify the sender immediately and 
delete the message. Any use of the message in violation of its purpose, any 
dissemination or disclosure, either wholly or partially is strictly prohibited, 
unless it has been explicitly authorized by the sender. As its integrity cannot 
be secured on the internet, Atos and its subsidiaries decline any liability for 
the content of this message. Although the sender endeavors to maintain a 
computer virus-free network, the sender does not warrant that this transmission 
is virus-free and will not be liable for any damages resulting from any virus 
transmitted.

Reply via email to