HOWTO : WebDAV on Ubuntu 9.04 Server

WebDAV is a file manager that running on web server. You can access it like on your desktop. Easy and enjoyable.

Install Ubuntu 9.04 server as usual and select LAMP and OpenSSH when asked for choice. You can also install vsFTPd if you want to but it is optional.

Step 1 :

sudo a2enmod dav_fs
sudo a2enmod dav
sudo a2enmod dav_lock

sudo /etc/init.d/apache2 restart

Step 2 :

To create a virtual host for the WebDAV.

sudo mkdir -p /var/www/webdav
chown www-data /var/www/webdav

sudo cp /etc/apache2/sites-available/default /etc/apache2/sites-available/webdav

sudo nano /etc/apache2/sites-available/webdav

Make the a portion of the file as the following :


....
DocumentRoot /var/www/webdav
<Directory /var/www/webdav/>
   Options Indexes FollowSymLinks MultiViews
   AllowOverride None
   Order allow,deny
   allow from all
</Directory>
<Location />
   DAV On
   AuthType Basic
   AuthName "webdav"
   AuthUserFile /var/www/.passwd.dav
   Require valid-user
   DavMinTimeout 600
   <LimitExcept GET PUT HEAD OPTIONS POST>
      Require valid-user
   </LimitExcept>
</Location>
....

Step 3 :

sudo htpasswd -c /var/www/.passwd.dav samiux

chown root:www-data /var/www/.passwd.dav
chmod 640 /var/www/.passwd.dav

suod chmod -R 0777 /var/www/webdav
sudo chown www-data:www-data /var/www/webdav

sudo /etc/init.d/apache2 restart

Step 4 :

To test if WebDAV owrks or not.

sudo apt-get install cadaver

sudo cadaver http://localhost/

If you got “dav:/” prompt, enter “quit” to quit. Otherwises, fix the problem.

Step 5 (Windows only) :

Download NetDrive at http://www.netdrive.net/ and set it accordingly. The port should be 80.

Now you can access your WebDAV server from Windows.

Step 6 (Ubuntu only) :

Go to “Place” > “Connect to Server“. Select “WebDAV (HTTP)“. Enter the IP of your WebDAV server and then press “Connect“. Submit the username and password. An icon will be displayed on your desktop. Double click it and go.

Now you can access your WebDAV server from Ubuntu.

That’s all!

UPDATED ON JUNE 30, 2009
If you open the OpenOffice files on the WebDAV by clicking, you can only open it in read only mode. However, there is method to overcome this problem. You open OpenOffice Write (for example), click the “Open file” and at the “Name of file” enter the following :

vnd.sun.star.webdav://192.168.0.100/openoffice_readonly_on_webdav.odt

Now you can edit and save it on WebDAV.

UPDATED ON JULY 3, 2009

For better performance (such as the speed that pasting files on the WebDAV), please fine tune your server as the following :

Performance tuning

UPDATED ON AUGUST 9, 2009

Make sure you have disabled the default site at Apache.

sudo a2dissite default

When you upload files by FTP, make sure you change the ownership of the files.

sudo chown -R www-data:www-data /var/www/webdav

14 Responses

  1. […] HOWTO : WebDAV on Ubuntu 9.04 Server WebDAV is a file manager that running on web server. You can access it like on your desktop. Easy and […] […]

  2. This is an excellent article, thank you!

  3. […] HOWTO : WebDAV on Ubuntu 9.04 Server […]

  4. […] NAS server with Ubuntu 8.04.1 – Part IV (a) HOWTO : Rebootless with Ksplice Uptrack on Ubuntu 9.04HOWTO : WebDAV on Ubuntu 9.04 ServerBridging VirtualBox 1.6.2 on Ubuntu […]

  5. […] server with Ubuntu 8.04.1 – Part II HOWTO : Home made NAS server with Ubuntu 8.04.1 – Part I HOWTO : WebDAV on Ubuntu 9.04 ServerHOWTO : Almost a perfect and secure Ubuntu 9.04 LAMP serverHOWTO : Home made NAS server with Ubuntu […]

  6. […] Server #2 WebDAV on Ubuntu 9.04 Server […]

  7. […] to WebDav setup for Ubuntu 9.04 By carltonjoseph Here it […]

  8. I want to setup a WebDAV without any passwords and anonymous access, limited to the 192.168.x.x/24 subnet. and 5.0.0.0/8
    Any Suggestions?
    I use Ubuntu 9.10 Desktop with apache2 and php5.

  9. […] Zur Installation von Dropbox auf einem Ubuntu-Server empfehle ich das und das, für WebDAV das hier. […]

  10. […] that you’ve got some storage and a server, you need WebDAV. Install Apache, and add WebDAV capabilities to it. Make sure the Apache user has read/write permissions on the webdav […]

  11. […] Here is a good tutorial show you how to Install WebDAV on Ubuntu Server: WebDAV is a file manager that running on web server. You can access it like on your desktop. Easy and enjoyable. […]

  12. […] 9.04 + branding “regression”Jeans distro – Jeans distro keren – Jeans distro murahHOWTO : WebDAV on Ubuntu 9.04 Server jQuery(document).ready(function() { jQuery('.sktooltip').each(function() { […]

  13. […] at http://www.debian-inside.com samiux.wordpress.com/2009/06/27/howto-webdav-on-ubuntu-9-04-server – besuchen Galileo Computing :: Ubuntu GNU/Linux – Das umfassende Handbuch … Ubuntu GNU/Linux […]