You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@httpd.apache.org by Matthew Denner <ma...@denner.demon.co.uk> on 2004/06/01 12:17:02 UTC

[users@httpd] .htaccess causes intermittent errors with Windows XP Web Folders

Hi,

I hope I'm not being stupid with this but I think I've discovered a 
problem in Windows XP WebFolders when connecting to an Apache2 server 
and I'd like someone more knowledgeable to confirm / deny this.

My setup is a SuSE 9.1 server running Apache 2.0.49 and a Windows XP 
Professional (Service Pack 1) client.

If I configure my users public_html directories to be accessible by 
WebDAV from the main configuration file I have no problems.  The 
relevant configuration section is:

Dav On
<Limit GET POST OPTIONS>
   Order allow,deny
   Allow from all
</Limit>
<LimitExcept GET POST OPTIONS>
   Order allow,deny
   Allow from 192.168.0.5
</LimitExcept>

I have absolutely no problem copying, deleting, or moving files when the 
system is configured like this.

However, I'd like to use .htaccess files, so I changed the main 
configuration so that it looks like:

Dav On
<Limit GET POST OPTIONS>
   Order allow,deny
   Allow from all
</Limit>
<LimitExcept GET POST OPTIONS>
   Order deny,allow
   Deny from all
</LimitExcept>

I then create a .htaccess file in the public_html folder for a user with 
the <Limit> and <LimitExcept> directives as first specified, with 'Allw 
from 192.168.0.5' ('Dav On' remains in the main configuration file).

With this setup I can open the folder fine (I see all the files, 
including .htaccess) but in my error_log on the server I see:

[Tue Jun 01 10:55:24 2004] [error] [client 192.168.0.5] client denied by 
server configuration: /home/matt/public_html/.htaccess

Because the standard Apache2 configuration limits access to .htaccess 
files, not that I need to tell you that!

I then try to copy 'foobar.txt' to the folder but my client reports 
"Cannot copy foobar: The network path was not found".  If I wait for 
about a minute and try again it succeeds, but I see the '.htaccess' 
error reported again.

If I immediately try to delete the 'foobar.txt' file I copied my client 
reports "Cannot delete file: Cannot read from the source file or disk". 
  Wait a minute, and I can delete it!

I'm assuming that, because '.htaccess' is limited, that somehow the 
Windows XP WebFolder client gets confused?  Does this sound like a 
plausible explanation and something I could report to Microsoft?  My 
feeling is that it is but also that there must be something I can do 
with Apache to "hide" the '.htaccess' file from the WebDAV clients (why, 
if it's limited using the <Files> directive, does it appear anyway?), 
and that someone must have hit this way before I did!

FYI, I put back the configuration so that the Web Folder had working 
access, then made an empty .htaccess file in public_html and tried 
again: I got exactly the same results as I have just described above 
with errors being reported on the client.

I guess, as a side question, I suppose what I am aiming to do is "safe"? 
  I mean, using .htaccess files to control WebDAV access to folders, 
after all, with the <Files> directive in place they shouldn't be able to 
do anything to it.

Matt

---------------------------------------------------------------------
The official User-To-User support forum of the Apache HTTP Server Project.
See <URL:http://httpd.apache.org/userslist.html> for more info.
To unsubscribe, e-mail: users-unsubscribe@httpd.apache.org
   "   from the digest: users-digest-unsubscribe@httpd.apache.org
For additional commands, e-mail: users-help@httpd.apache.org


Re: [users@httpd] .htaccess causes intermittent errors with Windows XP Web Folders

Posted by Joshua Slive <jo...@slive.ca>.
On Tue, 1 Jun 2004, Matthew Denner wrote:
> I hope I'm not being stupid with this but I think I've discovered a problem 
> in Windows XP WebFolders when connecting to an Apache2 server and I'd like 
> someone more knowledgeable to confirm / deny this.

> I then create a .htaccess file in the public_html folder for a user with the 
> <Limit> and <LimitExcept> directives as first specified, with 'Allw from 
> 192.168.0.5' ('Dav On' remains in the main configuration file).
>
> With this setup I can open the folder fine (I see all the files, including 
> .htaccess) but in my error_log on the server I see:
>
> [Tue Jun 01 10:55:24 2004] [error] [client 192.168.0.5] client denied by 
> server configuration: /home/matt/public_html/.htaccess
>
> Because the standard Apache2 configuration limits access to .htaccess files, 
> not that I need to tell you that!

> I'm assuming that, because '.htaccess' is limited, that somehow the Windows 
> XP WebFolder client gets confused?

You should start by looking at the exact sequence of requests that the 
client is making (as seen in the error log).  This should give a better 
idea about what is going on.

It is certainly possible that WebFolders can't deal with a directory that 
has protected files in it.  I haven't tried this myself.  Probably mod_dav 
should not even be revealing the presence of a file if it is protected. 
But we are just guessing until we see more details about what the client 
is doing.

Joshua.

---------------------------------------------------------------------
The official User-To-User support forum of the Apache HTTP Server Project.
See <URL:http://httpd.apache.org/userslist.html> for more info.
To unsubscribe, e-mail: users-unsubscribe@httpd.apache.org
   "   from the digest: users-digest-unsubscribe@httpd.apache.org
For additional commands, e-mail: users-help@httpd.apache.org