Ajcody-WebDAV

From Zimbra :: Wiki

Jump to: navigation, search

Contents

WedDAV Topics

Actual WebDAV Homepage

Please see Ajcody-WebDAV

WebDAV & Davfs2 - Briefcase - Documents - Notebook

At this time, I can not find anything in our documentation that states that Zimbra via WebDAV can replace a file server 100% and that it is a supported and promised feature & function of Zimbra. What is supported, seems to be the narrow action of "reading" objects from WebDAV. But the full functionality to grant complex permissions and shares, write files remotely, and expansive support for the various OS's and WebDAV clients is beyond official support at this time. If you believe differently, please share the source on this wiki page "Discussion" section.

Resources

Third Party Webdav Clients


Adam Recommends For File Transfers
Anyclient - Java GUI - Free

Anyclient seems to work against Zimbra reliably for file transfers between the workstation and the server. It is like a ftp client though, so it will not seamlessly integrate into your applications or your OS's file browser. That will most likely need to wait until we can resolve the bugs surrounding the native webdav client for the major OS's.

Cadaver - CLI - Free

cadaver is a command-line WebDAV client for Unix. It supports file upload, download, on-screen display, namespace operations (move/copy), collection creation and deletion, and locking operations. The file locking operations will not work against Zimbra at this time [6-2010] and I still find I can't remove some of those ._ files that the Mac makes. They usually end up in the Trash on Zimbra and you can remove them via ZWC > Trash > Empty Trash .

References:

Other Clients
Free
Commercial

General Bugs And RFE's


From Release Notes 6.0.3

  • Briefcase Spreadsheet and Presentation functions are beta for 6.0.0
DAV Related
Document Sorting In ZWC
Unsorted

Max File Upload Size

This impacts your webdav operations in regards to the maximum size the files can be.


Check the following variable:

zmprov gacf zimbraFileUploadMaxSize

To edit:

zmprov mcf zimbraFileUploadMaxSize 100000000 

Also, with ZCS 6+ :

zmprov gacf zimbraMailContentMaxSize

To edit:

zmprov mcf zimbraMailContentMaxSize 100000000

Apple - Mac


Apple - Mac Bugs & RFE's
Webdav Connect Via Mac Finder

On a Mac, I've confirmed this process works for read. It appears it can write files [sometimes] but in the end it will not do it correctly. My test had left a file saved incorrectly and also left a dot [.*] file that could be seen in ZWC. I've added some of my testing notes to bug 40924 .

  • Right Mouse Click or Ctrl+Mouse Button on Finder, this will bring up the option panel
    • Click on "Connect To Server"
      • Server Address Examples:
      • You'll be prompted to either do anonymous/guest or to login. username or usernamer@domain will work.
        • Webdav mounts will show up on the CLI as well. Using http://SERVERNAME/dav/USERNAME as an example, you'll get:
          • /Volumes/USERNAME
          • Using the CLI, you can then use shell tools to test file modification. I found that TextEdit wouldn't [most of the time] show the webdav path so I could save a new file there. Doh! Do a File > Save As and then to the right of the Save As field click on the down arrow. This will present the full filesystem for browsing. Webdav mounts would be listed under the shared section.
            • This attempt from the CLI gave open/create errors also:
            • cd /Volumes/ajcody/Briefcase
            • touch textedit-cli.rtf
            • open -e textedit-cli.rtf
            • /Applications/TextEdit.app/Contents/MacOS/TextEdit textedit-cli.rtf
          • That failed for me on 10.6.3
        • Cadaver for Mac, http://cadaver.darwinports.com/ , was a nice tool to use as well for testing.
Mounting WebDAV via CLI With mount_webdav

You can also access the webdav mount over the CLI. See man mount_webdav for details. In theory, you would just mount it and use it like any other mounted volume. This doesn't seem to bypass any existing issues though with webdav on mac against a zimbra server.

Dot And Temp Files Being Made On WebDAV Mount

Normally, one would use this method - Mac OS X v10.4 and later: How to prevent .DS_Store file creation over network connections - to prevent dot files from being made on remote/network mounts. This doesn't seem to work on OSX 10.6.3 when mounting with Finder.

Also, the command - dot_clean - does not remove these ._ files over a webdav mount. See also, Mac OS X: Apple Double Format Creates File Name With the Prefix '._'. This Confluence thread reports the same issue - Add a preference to hide "hidden" files in the attachments and they end up recommending to use another WebDAV client - Transmit [$] or AnyClient [Free].

TinkerTool

I don't have time to test this at this time, but I see that Tinkertool has an option under "Finder" for:

  • Network Access
    • Don't create hidden .DS_Store files over a network connection
      • Note: Affected network folders will no longer store comments, labels, icon positions or similar Finder attributes.

Seems to cause this change:

$ defaults read com.apple.desktopservices
{
    DSDontWriteNetworkStores = true;
}

 [ Now uncheck the option in Tinkertool and click on the Relaunch Finder option. ]

$ defaults read com.apple.desktopservices
2010-12-21 06:17:24.200 defaults[18855:903] 
Domain com.apple.desktopservices does not exist

Reference:

Windows - General


Windows Bugs & RFE's
References
Internet Explorer - IE

These various syntax tests either gives an error about access, page not found, or does output an xml type page listing details about the briefcase/notebook contents. It does not however, give it in a usable format - page indexing - where one could download the file so one could view it.

http/s ://$MAILSERVER/service/dav/$USERNAME
http/s ://$MAILSERVER/service/dav/$USERNAME@$DOMAIN
http/s ://$MAILSERVER/service/dav/$USERNAME%40$DOMAIN
http/s ://$MAILSERVER/dav/$USERNAME/Briefcase/
http/s ://$MAILSERVER/dav/$USERNAME/Notebook/
webdav/s ://$MAILSERVER/dav/$USERNAME/Briefcase/
webdav/s ://$MAILSERVER/dav/$USERNAME/Notebook/
Internet Explorer - IE - WinXp Trick

Something I found in regards to Windows XP here and here:

Note: When connecting over non-SSL connections, append a “/#” to the URL here. Windows XP has two built-in methods 
for connecting via WebDAV. Appending /# is a workaround that forces the use of the Web Folder Client connection, 
which will authenticate successfully to the WebDav-enabled folder as configured here.  
[ example: http://ZIMBRA-SERVER/dav/USER@DOMAIN/Briefcase/# or http://ZIMBRA-SERVER/dav/USER@DOMAIN/Briefcase# ]
How-To For Windows 7, ZCS 6.0.6, And Mapping Webdav Drive

References for this section:

I'm leaving some notes here concerning other versions of Windows but your better off consulting WebDAV for non-windows 7 versions rather than here.

IE Performance Work Around

On Windows 7, all requests to WebDAV receive a 3 second delay in the Windows explorer. This makes WebDAV in Windows7 Explorer extremely slow. To fix this, you'll need to change IE's proxy settings:

Open IE : Tools : Internet Options : Connections : LAN settings : 
Un-check Automatically detect settings : Click Ok :Click Ok 
Setup Authentication Type For Webdav

By default, the Mini-Redirector uses Digest authentication. You can change this to Basic authentication in Windows 7 registry.

To confirm webdav is accessible from the windows 7 client and if it requires https or can also use http, test the following links -- adjusting for your zimbra server name and the user. You'll be prompted for login information if you aren't logged into ZWC already when attempting these - login user the USER@DOMAIN format with the user Zimbra password. These should work both under IE8 and Firefox 3. These url's will just show a simple xml/text file with details about the resource.

http://ZIMBRA-SERVER/dav/USER@DOMAIN/Briefcase [this 'path' is the primary use for webdav]
http://ZIMBRA-SERVER/dav/USER@DOMAIN/Notebook
http://ZIMBRA-SERVER/dav/USER@DOMAIN/Calendar
http://ZIMBRA-SERVER/dav/USER@DOMAIN/Tasks
http://ZIMBRA-SERVER/dav/USER@DOMAIN/Contacts

To change the authentication style, edit the Windows registry [Windows 7, Vista, WinXP]:

Choose "Run" in the start menu and type: "regedit" 
Windows 7 & Vista Reg Path:
[HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Services\WebClient\Parameters\BasicAuthLevel
Windows XP Reg Path:
[HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Services\WebClient\Parameters\UseBasicAuth
--
default is set to 1 [good if your using commercial certificate and require https:// for authentication for zimbra]
change to 2 to allow basic authentication [http:// for zimbra]
The mapping for the value is described as:
* 0 - Basic authentication disabled
* 1 [dword:00000001] - Basic authentication enabled for SSL shares only [https]
* 2 [dword:00000002] or greater - Basic authentication enabled for SSL [https] shares and for non-SSL [http] shares
Turn Off File Locking - Optional

Optional: To turn off locking [Windows 7 only?]:

Choose "Run" in the start menu and type: "regedit"
[HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Services\WebClient\Parameters] 
"SupportLocking"=dword:00000000

The Mini-Redirector included in Windows 7 and Vista fully supports SSL and the port can be different from 80. Windows XP only supports port 80.

Confirm WebClient Service To Automatic

Make sure the "WebClient" service is started:

Use "Start->Run->services.msc" and confirm the service "WebClient" is set to automatic.

Restart Windows now.

Mounting The Zimbra WebDAV Share Via File Explorer

You should of restarted the windows box after changing and registry values.

  • Open Windows Explorer, Start > Run > explorer.exe
  • And then do, Tools > Map Network Drive
  • Drive Letter - pick a letter you want to use
  • Folder Path example:
    • Again - Briefcase is your primary webdav folder for Zimbra read/write use, others are just shown as examples for viewing.
      • UNC examples
        • \\ZIMBRA-SERVER@80\dav\USER@DOMAIN\Briefcase
        • \\ZIMBRA-SERVER@80\dav\USER@DOMAIN\Notebook
        • \\ZIMBRA-SERVER@80\dav\USER@DOMAIN\Tasks
        • \\ZIMBRA-SERVER@80\dav\USER@DOMAIN\Calendar
        • \\ZIMBRA-SERVER@80\dav\USER@DOMAIN\Contacts
  • Reconnect at logon - your choice.
  • "Connect using different credentials"
    • If you check this box, you might you need to enter your username and password twice before you see the share.
    • I was able to remount shares without checking it, but I believe Windows had already cached my authentication details at that point.
Mounting The Zimbra WebDAV Share Via CMD
C:\Users\ajcody>net use p: http://ZIMBRA-SERVER/dav/USER/Calendar /user:USER /persistent:yes

Enter the password for 'USER' to connect to 'ZIMBRA-SERVER':
The command completed successfully.

C:\Users\ajcody>dir p:\
 Volume in drive P has no label.
 Volume Serial Number is 0000-0000

 Directory of p:\

04/28/2010  07:50 AM    <DIR>          .
04/28/2010  07:50 AM    <DIR>          ..
The parameter is incorrect.
??,☼                   0 39bd19c5-e71d-4cd2-9777-badf118b34c9.ics
               1 File(s)              0 bytes
               2 Dir(s)  104,353,939,456 bytes free

How-To For Windows 7, ZCS 6.0.6, And Webdrive

Download evaluation version from url below and installed it. My version was 9.12:

I have the registry settings already set on my Windows 7 machine as described above prior to doing this test.

Setup a new site using:

  • Enter the name for the site you will be connecting to:
    • I put in mail59-briefcase since mail59 is my test server and I would be connecting to my briefcase
  • Drive Letter
    • I went with the default that was selected - W
  • Next
  • Server type
    • WebDAV
    • Left "connect securely" unchecked. If you require https to login to zimbra, you'll want to check this.
  • Enter the URL for the Server
  • Next
  • For username, I put in : ajcody
  • For password, put in my zimbra password
  • left the "save password" checked.
  • Clicked on the "Test Connection" and confirmed it worked.
  • Next
  • Checked the "connect to site now"
  • Checked the "connect at login/startup"
  • Finished

The default properties that are setup seem to cause some issues with renames and so forth. Left some ugly cache files as well. I adjusted the properties like below and things seem to work well with them like this. Open up the "Properties" section for the new site you just made.

  • File
    • check - Encode filenames in UTF-8
    • check - Cache temporary MS Office files
    • check - Ignore Desktop.ini files
    • uncheck - Enable NTFS File Security [for applications requiring NT security]
    • check - Cache small writes by applications
    • check - Test for Write Access when files are created
  • Ok

Disconnect the map drive if it is and reconnect it.

Linux


Linux Webdav Bug/RFE's
Mounting WebDAV
mount.davfs - davfs2

Summary: Isn't working reliably. Appears to mount drive but shortly after I encounter problems. Doing a df -h will show the mount path but with the error of "Transport endpoint is not connected". Can umount if I use the -f flag as root.


Ubuntu example:

apt-get install davfs2
sudo dpkg-reconfigure davfs2
 ** SUID bit set so non-root users can mount.

You can customize davfs's behavior in /etc/davfs2/davfs2.conf . These config files will also exist in the user's home directory if you want to enable them there - $HOME/.davfs2/ . If you setup davfs2 for suid, then you'll want to note this option in davfs2.conf below. You'll want to add the unix usernames that will be doing the webdav mounts in the group mentioned in that variable in /etc/group .

dav_group     users

I've also read that davfs2 users object titles for filenames, meaning that if two 'objects' have the same title then only one will be displayed on the filesystem. To fix, edit /etc/davfs2/davfs2.conf and add or change:

use_displayname 0

Another option you might want to set in davfs2.conf is below. Some references to turning off locking states it as a mount option - -o nolocks , this no longer works or is available with mount with my testing. [Most likely you'll want to add this to the users $HOME/.davfs2/davfs2.conf file]

# use_locks 1 [default is 1, meaning it's on]
use_locks 0

Setup mount point as user, ajcody in example:

mkdir -p /home/ajcody/davfs/mail59

Test mounting via the CLI, example:

mount -t davfs 'http://192.168.0.59/dav/ajcody' /home/ajcody/davfs/mail59

Example in /etc/fstab :

http://192.168.0.59/dav/ajcody /home/ajcody/davfs/mail59   davfs   rw,noexec,nosuid,noauto,nodev,user 0 0

Once in /etc/fstab, the user can do the following - using example:

mount /home/ajcody/davfs/mail59
fusedav

On Ubuntu, easy as doing a :

apt-get install fusedav . 

Then vi /etc/fuse.conf and set the option for - user_allow_other .

Example from CLI:

[as ajcody]
mkdir -p /home/ajcody/davfs/mail59
fusedav -u username -p password http://192.168.0.59/av/ajcody /home/ajcody/davfs/mail59
wdfs

If you have wdfs installed, then you can add a line like this in /etc/fstab:

wdfs#http://192.168.0.59/dav/ajcody /home/ajcody/davfs/mail59   fuse rw,noexec,nosuid,noauto,nodev,user,owner 0 0
Gnome Apps
Evolution And WebDAV
Nautilus - Gnome File Manager

To setup a webdav connection:

  • File > Connect to Server
    • Service Type = Webdav (HTTP) or Secure Webdav (HTTPS)
    • Server = [example] 192.168.0.59 or mail59.zimbra.DOMAIN.com
    • Port = 80 for HTTP , 443 for HTTPS
    • Folder = dav/ajcody or dav/ajcody/Briefcase
    • User Name = [example] ajcody or ajcody@mail59.zimbra.DOMAIN.com
    • Check the "Add bookmark" box
      • Bookmark name = this is the name that will show up under Nautilus Places sidebar

The path that is establish if you were to manual type it in the path/url box would be:

dav://ajcody@192.168.0.59/dav/ajcody

Which can also be witnessed with the CLI command for gvfs mounts:

$ gvfs-mount -l
Drive(0): CD/DVD/HDDVD Drive
  Type: GProxyDrive (GProxyVolumeMonitorGdu)
Mount(0): WebDAV on 192.168.0.59 -> dav://ajcody@192.168.0.59/dav/ajcody
  Type: GDaemonMount

This seems to work for file opening and browsing.

Nautilus For KDE Workstation

For example, if you use Kubuntu, just install nautilus like:

sudo apt-get install nautilus

You can then launch from the cli to test out by doing:

nautilus

Here's a little bit that is sorta stupid. Nautilus will actually cache the webdav data in this location [for example] :

/home/ajcody/.gvfs/WebDAV on 192.168.0.59/

I can use konquerer/dolphin to then browse to /home/ajcody/.gvfs/WebDAV on 192.168.0.59/Briefcase/ and open files that would normally fail if I mounted the webdav location directly in dolphin. At least for a jpg file I'm testing against. For .doc files, I found OOo would fail but I could use Abiword just fine. This is probably tied to cache files OOo is trying to make vs Abiword not creating them.

Nautilus - GVFS And FUSE - FUSEDAV

Basic Package names: gvfs-fuse fuse fusedav

Reference to tracks bugs tied to GVFS-FUSE, GVFS-Webdav Backend:

There are some gvfs commands you can use as well to trouble shoot issues with gvfs/fuse-dav and Nautilus:

gvfs-cat            gvfs-ls             gvfs-mount          gvfs-rm             gvfs-tree
gvfs-copy           gvfs-mkdir          gvfs-move           gvfs-save           
gvfs-info           gvfs-monitor-dir    gvfs-open           gvfs-set-attribute  
gvfs-less           gvfs-monitor-file   gvfs-rename         gvfs-trash
KDE Apps
Bugs Against KDE
KNetAttach

Manual for KNetAttach , which can do webdav mounts. The manual states: "Network folders show up in a special location of Konqueror and Dolphin called a virtual folder. This virtual folder is accessed by typing remote:/ in the location bar or by selecting Network from the Places panel. You will then be able to see any folders which have been previously added and you also will be able to use the wizard to add new ones."

To use with Dolphin, you'll see on the left an object/icon called Network. Click on that and in the main body of Dolphin you should see an object called "Add Network Folder" now to configure a webdav mount.

To use with Konqueror, enabled the sidebar. Settings > Sidebar or F9 . On the left, look for the icon called Network. The, from the top bar - Go > Network Folders . You'll see the "Add Network Folder" object now to configure a webdav mount.

KDE3 - Konqueror3

This works for read access, but not write. Though it does seems to allow you to create a "New Folder" when you right-click on the page and do Select New > Folder. The other options - Text File, etc. - fail as well as drop and drag.

  • Open Konquerer
  • Put in the appropriate url and authenticate when popup shows
    • webdav/s://SERVERNAME/dav/USERNAME/Briefcase
KDE4 - Konqueror4

This doesn't seem to work with reads or writes.

  • Open Konquerer
  • Put in the appropriate url and authenticate when popup shows
    • webdav/s://SERVERNAME/dav/USERNAME/Briefcase
    • webdav/s://SERVERNAME/service/dav/USERNAME/Briefcase
    • http/s://SERVERNAME/dav/USERNAME/Briefcase
    • http/s://SERVERNAME/service/dav/USERNAME/Briefcase

The http will output the properties of the destination but doesn't actually give a file listing.

Firefox

These various syntax tests either gives an error about access, page not found, or does output an xml type page listing details about the briefcase/notebook contents. It does not however, give it in a usable format - page indexing - where one could download the file so one could view it.

http/s ://$MAILSERVER/service/dav/$USERNAME
http/s ://$MAILSERVER/service/dav/$USERNAME@$DOMAIN
http/s ://$MAILSERVER/service/dav/$USERNAME%40$DOMAIN
http/s ://$MAILSERVER/dav/$USERNAME/Briefcase/
http/s ://$MAILSERVER/dav/$USERNAME/Notebook/
webdav/s ://$MAILSERVER/dav/$USERNAME/Briefcase/
webdav/s ://$MAILSERVER/dav/$USERNAME/Notebook/
Personal tools