I've set up a test account to debug this problem. Please drop me a mail and I 
give you a WebDAVS login to a Sarge server to reproduce the problem. I'm able 
to reproduce it in various ways. You can reproduce the bug several times 
using the commands below:

Below I give you a test login to our server to reproduce the strange 
Bug#365558: [#365558] davfs2: Garbage is displayed in some directories of 
mounted WebDAV directory.

Working Konqueror WebDAVS URL: webdavs://cx.hu:1443
Username: **** drop me a mail ****
Password: **** drop me a mail ****

How you can reproduce the bug:

Open in Konqueror: webdavs://cx.hu:1443
Login with the user info provided above.
Navigate to: webdavs://cx.hu:1443/editor/tiny_mce/plugins/_template
The following subdirectories and files will appear:

webdavs://cx.hu:1443/editor/tiny_mce/plugins/_template/images
webdavs://cx.hu:1443/editor/tiny_mce/plugins/_template/langs
webdavs://cx.hu:1443/editor/tiny_mce/plugins/_template/editor_plugin.js
webdavs://cx.hu:1443/editor/tiny_mce/plugins/_template/editor_plugin_src.js
webdavs://cx.hu:1443/editor/tiny_mce/plugins/_template/popup.htm
webdavs://cx.hu:1443/editor/tiny_mce/plugins/_template/readme.txt

List of this directory at the server:

hp1:/var/www/cx.hu/editor/tiny_mce/plugins/_template# ls -la
összesen 28
drwxr-xr-x   4 www-data www-data  114 2006-04-29 01:29 .
drwxr-xr-x  25 www-data www-data 4096 2006-04-29 01:28 ..
-rw-r--r--   1 www-data www-data 2039 2006-04-29 01:29 editor_plugin.js
-rw-r--r--   1 www-data www-data 8564 2006-04-29 01:29 editor_plugin_src.js
drwxr-xr-x   2 www-data www-data   25 2006-04-29 01:30 images
drwxr-xr-x   2 www-data www-data   30 2006-04-29 01:30 langs
-rw-r--r--   1 www-data www-data 1524 2006-04-29 01:29 popup.htm
-rw-r--r--   1 www-data www-data  112 2006-04-29 01:29 readme.txt

Note: The locale of the server is: LANG=hu_HU, but all uploaded files contains 
only ASCII characters.

Then login as root to your Debian unstable box (sirius), create a directory 
and mount the WebDAVS directory (Note: the locale is the same: hu_HU):

sirius:/# mkdir /mnt/dav
sirius:/# cd /mnt/dav
sirius:/mnt/dav# mkdir cx.hu
sirius:/mnt/dav# mount -t davfs https://cx.hu:1443 /mnt/dav/cx.hu

Provide username and password as above and accept the certificate.
The WebDAVS share will be mounted under /mnt/dav/cx.hu

List contents of the above _template directory:

sirius:/mnt/dav# ls -la cx.hu/editor/tiny_mce/plugins/_template/
összesen 15
drwx------ 1 root root  512 2006-04-29 01:29 .
drwx------ 1 root root  512 2006-04-29 01:28 ..
-rw------- 1 root root 2039 2006-04-29 01:29 editor_plugin.js
-rw------- 1 root root 8564 2006-04-29 01:29 editor_plugin_src.js
drwx------ 1 root root  512 2006-04-29 01:30 images
drwx------ 1 root root  512 2006-04-29 01:30 langs
-rw------- 1 root root 1524 2006-04-29 01:29 popup.htm
-rw------- 1 root root  112 2006-04-29 01:29 readme.txt
drwx------ 1 root root  512 2006-04-29 01:29 _template

The last entry is _template, a subdirectory that does not exists on the server 
as you can verify it in Konqueror. It's interesting. :-) Let's look into 
this "ghost subdirectory":

sirius:/mnt/dav# ls -la cx.hu/editor/tiny_mce/plugins/_template/_template/
ls: /mnt/dav/cx.hu/editor/tiny_mce/plugins/_template/_template/: Nincs ilyen 
fájl vagy könyvtár

The ls command reports, that the directory does  not exists (in Hungarian: 
Nincs ilyen fájl vagy könyvtár).

Another example in this directory tree:

Go to webdavs://cx.hu:1443/editor/tiny_mce/plugins in Konqueror. Note, that 
there is no plugins subdirectory in this directory. Chdir here in the davfs 
mount:

sirius:/mnt/dav# cd cx.hu/editor/tiny_mce/plugins/

List files and directories:

sirius:/mnt/dav/cx.hu/editor/tiny_mce/plugins# ls -la
összesen 14
drwx------ 1 root root 512 2006-04-29 01:28 .
drwx------ 1 root root 512 2006-04-29 01:28 ..
drwx------ 1 root root 512 2006-04-29 01:28 advhr
drwx------ 1 root root 512 2006-04-29 01:28 advimage
drwx------ 1 root root 512 2006-04-29 01:28 advlink
drwx------ 1 root root 512 2006-04-29 01:28 autosave
drwx------ 1 root root 512 2006-04-29 01:28 cleanup
drwx------ 1 root root 512 2006-04-29 01:28 contextmenu
drwx------ 1 root root 512 2006-04-29 01:28 directionality
drwx------ 1 root root 512 2006-04-29 01:28 emotions
drwx------ 1 root root 512 2006-04-29 01:28 flash
drwx------ 1 root root 512 2006-04-29 01:28 fullpage
drwx------ 1 root root 512 2006-04-29 01:28 fullscreen
drwx------ 1 root root 512 2006-04-29 01:28 iespell
drwx------ 1 root root 512 2006-04-29 01:28 inlinepopups
drwx------ 1 root root 512 2006-04-29 01:28 insertdatetime
drwx------ 1 root root 512 2006-04-29 01:28 noneditable
drwx------ 1 root root 512 2006-04-29 01:28 paste
drwx------ 1 root root 512 2006-04-29 01:28 plugins
drwx------ 1 root root 512 2006-04-29 01:29 preview
drwx------ 1 root root 512 2006-04-29 01:29 print
-rw------- 1 root root  49 2006-04-29 01:28 readme.txt
drwx------ 1 root root 512 2006-04-29 01:29 save
drwx------ 1 root root 512 2006-04-29 01:29 searchreplace
drwx------ 1 root root 512 2006-04-29 01:29 table
drwx------ 1 root root 512 2006-04-29 01:29 _template
drwx------ 1 root root 512 2006-04-29 01:29 zoom

Note, that a plugins "ghost directory" exists here, but you cannot enter into 
it as in the other example. More examples can be found in this tree.
Consequence: The bug not relates to the underscore character in the name of 
the _template subdirectory above and can be reproduced with different 
directory structures and files.

Finally, the most _strange_ thing:

There is a similar ghost directory, but you can enter into it:

sirius:/mnt/dav# cd cx.hu/editor/tiny_mce/tiny_mce
sirius:/mnt/dav/cx.hu/editor/tiny_mce/tiny_mce# ls -la
összesen 1
drwx------ 1 root root 512 2006-04-29 01:28 .
drwx------ 1 root root 512 2006-04-29 01:28 ..
?--------- ? ?    ?      ?                ? 
dAttribValues&&r.validAttribValues[an]&&!r.validAttribValues[an].test(av))return"";if(av.length!=0&&av=="
?--------- ? ?    ?      ?                ? 
E.isNotDirty=true;return;case"reset":var formObj=tinyMCE.isMSIE?win
?--------- ? ?    ?      ?                ? 
inyMCE.convertSpansToFonts(this.selectedInstance.getDoc());return h;}return 
null;};TinyMCE_Engine.prototype._fixList
?--------- ? ?    ?      ?                ? 
Levels.length--;this.undoIndex--;}b=inst.undoBookmark;if(!b)b=inst.selection.getBookmark();this.undoIndex++;thi
?--------- ? ?    ?      ?                ? 
ommand("mceInsertContent",false,"<strike>"+this.selection.getSelect
?--------- ? ?    ?      ?                ?  TinyMCE_Engine()
{this.majorVersion="2";this.minorVersion="0.5.1";this.releaseDate="2006-03-22";this.instances

A section of JavaScript code from a .js file shows up in the results of the ls 
command! This could be a strange protocol error or some kind of memory 
corruption, or something else. This causes problems only with davfs and does 
not affect Konqueror or other WebDAVS clients.

The server is fairly new, seems to be intact and does not contain many 
application yet. The client is stable enough to develop PHP, Java and Python 
applications on it without problems. It is frequently upgraded and 
dist-upgraded. There was a successful dist-upgrade about 10 days ago. The 
server has been upgraded last night.

You can show uploaded contents at:
http://cx.hu
https://cx.hu

You can freely modify the contents or do whatever you want to track down this 
bug. The site has some default resource limits: 250M, 25000 files, etc.

Some more info about the strange davfs bug:

- I've found the bug, when I first mounted a WebDAV share to develop a PHP 
application on our server. Quanta could not import files from the mounted 
folder. I decided to use another editor to edit the files, then found the bug 
in davfs when trying to open PHP source files. Corrupt directory structure is 
shown by davfs independently of the editor/tool you use.

- I've reinstalled davfs but it did not help.

- Apache2 configuration used to provide the WebDAV share:

<VirtualHost *:1443>

        Include /etc/apache2/ssl/specsoft.hu/ssl.conf

        ServerName cx.hu
        ServerAlias www.cx.hu
        ServerAdmin [EMAIL PROTECTED]
        ServerSignature Off

        ErrorLog /var/log/apache2/cx.hu-webdavs-error.log
        CustomLog /var/log/apache2/cx.hu-webdavs-access.log combined
        LogLevel warn
        # Possible values include: debug, info, notice, warn, error, crit, 
alert, emerg.

        # Do not execute scripts
        <Files ~ "\.(php|php?|cgi|shtml|py|pyc|pyo|pyw)$">
            ForceType text/plain
        </Files>
        <Files ~ "\.(pyc|pyo|pyw)$">
            ForceType application/octet-stream
        </Files>

        DocumentRoot /var/www/cx.hu
        <Directory /var/www/cx.hu>
            # Restricted access, no overrides allowed
            Options Indexes FollowSymLinks MultiViews
            AllowOverride None
            Order allow,deny
            Allow from all

            # Enable and configure WebDAV
            DAV On
            DAVMinTimeout 600
            DAVDepthInfinity off
            LimitXMLRequestBody 10000000
            AllowOverride None

            # MySQL authentication
            Auth_MYSQL on
            AuthName "cx.hu"
            AuthType Basic
            Auth_MySQL_Encryption_Types Plaintext
            Auth_MySQL_Username *****************
            Auth_MySQL_Password *****************
            Auth_MySQL_DB provider
            Auth_MySQL_Password_Table domains
            Auth_MySQL_Username_Field username
            Auth_MySQL_Password_Field password
            Auth_MySQL_Password_Clause " AND domain='cx.hu'"
            Auth_MySQL_Empty_Passwords off
            Require valid-user
        </Directory>

</VirtualHost>

The port differs (1443) from the standard HTTPS access (443), since the 
handling of some file types (for example .php) must be different.

Reply via email to