PDA

View Full Version : Newb: Please help me activate webdav


smartin
5th December 2007, 23:15
Hi,

I'm running Dapper server 6.0.LTS with the Ubuntu desktop.

I had this running just fine in Feisty but the move to Dapper Server has broken something...

This is what I have done:

To enable the apache modules:

sudo a2enmod

dav

sudo a2enmod

dav_fs


Then make sure the lock file exists:

$ cd /var/lock/apache2
$ sudo touch DAVLock
$ sudo chown www-data:www-data DAVLock


To create dav folder:

sudo mkdir /var/www/dav
sudo chgrp www-data /var/www/dav
sudo chmod 775 /var/www/dav


To create user folder:

sudo mkdir /var/www/dav/simon
sudo chgrp www-data /var/www/dav/simon
sudo chmod 775 /var/www/dav/simon


To create the user password:

sudo htpasswd -c /var/www/dav/simon/.DAVlogin simon


Then create restrictions to folder:

sudo nano /etc/apache2/mods-enabled/dav_fs.conf


Paste in:

DAVLockDB /var/lock/apache2/DAVLock
#DAVMinTimeout 600

<Location /dav/simon/>
Dav On

AuthType Basic
AuthName simon
AuthUserFile /var/www/dav/simon/.DAVlogin

<LimitExcept OPTIONS>
Require user simon
</LimitExcept>
</Location>


Restart apache:

sudo /etc/init.d/apache2 restart


When I then try to access the folder http://myserver/dav/simon using the finder of my OSX box I get an error to the effect that the server cannot be found.

When I try a browser, I can see the folder /simon and can get inside it without a password.

What the heck have I done wrong?

TIA!

Simon

smartin
6th December 2007, 13:07
Hi,

I don't know if it's relevant but if I open my DAVLock file in gEdit, there's nothing in it.

I was expecting something to be in that file...

?

Simon

falko
7th December 2007, 14:51
Any errors in the log files on the server?

smartin
7th December 2007, 14:57
Any errors in the log files on the server?

Falko! :-)

Im so sorry but I'm enough of a newb not to know how to read the log files. What is the command to see them?

Thanks!

Simon

smartin
7th December 2007, 17:07
Any errors in the log files on the server?

Falko,

Ok, I'm blufffing this...

This seems to be the log in /var/log/apache2/accesslog. Last few lines. I had tried the webdav folder again just before:

"http://192.168.0.11/" "Mozilla/5.0 (Macintosh; U; Intel Mac OS X; en-US; rv:1.8.1.11) Gecko/20071127 Firefox/2.0.0.11"
192.168.0.6 - - [05/Dec/2007:18:47:31 +0000] "OPTIONS /simon/ HTTP/1.1" 200 - "-" "WebDAVFS/1.4.1 (01418000) Darwin/8.11.0 (Power Macintosh)"
192.168.0.77 - - [06/Dec/2007:20:00:28 +0000] "OPTIONS /simon/ HTTP/1.1" 200 - "-" "WebDAVFS/1.5 (01508000) Darwin/9.1.0 (i386)"
192.168.0.77 - - [07/Dec/2007:15:57:19 +0000] "OPTIONS /simon/ HTTP/1.1" 200 - "-" "WebDAVFS/1.5 (01508000) Darwin/9.1.0 (i386)"


The only other log in the same folder is the error.log. Last few lines again:

Wed Dec 05 17:07:25 2007] [notice] caught SIGTERM, shutting down
[Wed Dec 05 17:07:27 2007] [notice] Apache/2.0.55 (Ubuntu) DAV/2 PHP/5.1.2 configured -- resuming normal operations
[Wed Dec 05 18:38:45 2007] [notice] caught SIGTERM, shutting down
[Wed Dec 05 18:38:45 2007] [notice] Apache/2.0.55 (Ubuntu) DAV/2 PHP/5.1.2 configured -- resuming normal operations
[Thu Dec 06 14:59:40 2007] [notice] caught SIGTERM, shutting down
[Thu Dec 06 15:00:44 2007] [notice] Apache/2.0.55 (Ubuntu) DAV/2 PHP/5.1.2 configured -- resuming normal operations


Any help?

Simon

falko
8th December 2007, 12:35
The logs look ok.
What's the output of ls -la /var/www/dav/simon?

smartin
10th December 2007, 11:59
The logs look ok.
What's the output of ls -la /var/www/dav/simon?

Falko,

I made a typo in my description above which has now been corrected. The folder I created is var/www/dav/simon. Above I described it as var/www/simon...

The output is:

ls -la /var/www/dav/simon
total 12
drwxrwxr-x 2 root www-data 4096 2007-12-10 09:58 .
drwxrwxr-x 3 root www-data 4096 2007-12-10 09:56 ..
-rw-r--r-- 1 root root 20 2007-12-10 09:58 .DAVlogin


I seem to have more logs ( I tried accessing the dav folder just before reading these):
In var/logs/apache2 I have:
access.log with nothing in it.
access.log.1 with:

"http://192.168.0.11/" "Mozilla/5.0 (Macintosh; U; Intel Mac OS X; en-US; rv:1.8.1.11) Gecko/20071127 Firefox/2.0.0.11"
192.168.0.6 - - [05/Dec/2007:18:47:31 +0000] "OPTIONS /simon/ HTTP/1.1" 200 - "-" "WebDAVFS/1.4.1 (01418000) Darwin/8.11.0 (Power Macintosh)"
192.168.0.77 - - [06/Dec/2007:20:00:28 +0000] "OPTIONS /simon/ HTTP/1.1" 200 - "-" "WebDAVFS/1.5 (01508000) Darwin/9.1.0 (i386)"
192.168.0.77 - - [07/Dec/2007:15:57:19 +0000] "OPTIONS /simon/ HTTP/1.1" 200 - "-" "WebDAVFS/1.5 (01508000) Darwin/9.1.0 (i386)"


error.log:

[Sun Dec 09 07:35:20 2007] [notice] Apache/2.0.55 (Ubuntu) DAV/2 PHP/5.1.2 configured -- resuming normal operations
[Mon Dec 10 09:59:41 2007] [notice] caught SIGTERM, shutting down
[Mon Dec 10 09:59:42 2007] [notice] Apache/2.0.55 (Ubuntu) DAV/2 PHP/5.1.2 configured -- resuming normal operations


error.log.1:

[Wed Dec 05 18:38:45 2007] [notice] Apache/2.0.55 (Ubuntu) DAV/2 PHP/5.1.2 configured -- resuming normal operations
[Thu Dec 06 14:59:40 2007] [notice] caught SIGTERM, shutting down
[Thu Dec 06 15:00:44 2007] [notice] Apache/2.0.55 (Ubuntu) DAV/2 PHP/5.1.2 configured -- resuming normal operations
[Sun Dec 09 07:35:19 2007] [notice] caught SIGTERM, shutting down


Why have I suddenly got log.1 files...?

Any help?

Simon

smartin
10th December 2007, 12:03
Falko,

I just used my browser to go to http://127.0.0.1/dav/simon/.

I then got the username/password challenge as expected and accessed the folder as expected.

I then tried accessing the folder using a web-browser on my OSX box on the same network and got the username/password challenge but when I clicked Ok I got:

Object Not Found
The requested URL '/dav/simon' was not found on the RomPager server.

Return to last page


When I use the OSX Finder to access the folder, things work as expected!

I think something has sorted itself out! Weird error using a browser from the OSX box though...

Simon