# davfs2 - unable to mount my NAS D-Link DNS 320.

## augustin2

Hi,

I am trying to mount a directory located on my NAS but after suppling the username and password, I get a mounting failed error. 

```
 # mount /home/me/dav

Please enter the username to authenticate with server

http://192.168.1.15/Volume_1/me or hit enter for none.

  Username: me

Please enter the password to authenticate user me with server

http://192.168.1.15/Volume_1/me or hit enter for none.

  Password:  

/sbin/mount.davfs: Mounting failed.

404 Not Found
```

The previous is true both as root and as standard user.

Here is what I have done:

I have emerged davfs2

I have added the coda support in Files Systems for kernel (built in kernel not as module)

I have added the standard user me  to davfs2 group

I have added this line in /etc/fstab

```
http://192.168.1.15/Volume_1/me ~/dav davfs rw,user,noauto 0 0
```

I have created ~/dav this way

```
$ mkdir -p /home/me/dav
```

When I used the domain name in conjunction with dyndns (instead of the lan adresse)  I have an additional information

 *Quote:*   

> Could not read status line: connection was closed by server

 

Help would be welcome

----------

## hdcg

Hi,

I would guess that the 404 is the HTTP status code and means that the requested path is not known by your NAS. Are you sure that the path is correct? Can you access it via your web browser?

The shown IP address is a private one. Most likely the dyndns entry resolves to a public IP address and your firewall prevents access via this path.

But first try to solve the 404.

Best Regards,

Holger

----------

## augustin2

Hi hdcg, thank you for answering me.

In the web browser I can access the admin page of the nas both with the local IP and the domain name-dyndns converted

http://192.168.1.15 or http://domanin.ext/ but not folders under this root using for ex http://domain.ext/Directory/Directory

After authentification in the admin space I can seletc files and, after that, browse the folders but the adress in the address bar remains always the same http://192.168.1.15/web/web_file/web_file_server.html

But it is not the way I would like things to happen because I must use upload and download buttons in the page. What I want is to be able to mount and browse the device in nautilus.

I read that should be possible using either davfs2 or samba (cifs).

I created an other post about samba (cifs) here https://forums.gentoo.org/viewtopic-t-998792-highlight-.html.

About davfs2, if I understand well this page http://doc.ubuntu-fr.org/davfs2 (sorry it is in French) I would be able to do the same with davfs2. But when I try to mount as standard user I am told, only root can do that despite the fact that the fstab options include user.

Trying to mount as root I get this

(note: the username me is used both in Gentoo and in the NAS

```
localhost me# mount -t davfs http://192.168.1.15/ /home/me/dav

Please enter the username to authenticate with server

http://192.168.1.15/ or hit enter for none.

  Username: me

Please enter the password to authenticate user me with server

http://192.168.1.15/ or hit enter for none.

  Password:  

/sbin/mount.davfs: mounting failed; the server does not support WebDAV

localhost me # 
```

My webshares are davfs enabled into the nas.

----------

## hdcg

Hi,

I think the WebDAV URL is still wrong.

```
localhost me# mount -t davfs http://192.168.1.15/ /home/me/dav 

Please enter the username to authenticate with server 

http://192.168.1.15/ or hit enter for none. 

  Username: me 

Please enter the password to authenticate user me with server 

http://192.168.1.15/ or hit enter for none. 

  Password:  

/sbin/mount.davfs: mounting failed; the server does not support WebDAV 

localhost me #
```

You entered a valid url. Hence not the 404 error. But no WebDAV share is provided on this url (the root folder). Just for completion. WebDAV is an extension to the HTTP protocoll and therfore you can simply browse a WebDAV share with a Web Browser. The opposite direction (access a normal HTTP server via WebDAV) will not work.

I did a google search for "D-Link DNS 320 WebDAV". According to the manual the WebDAV URL should be 

```
https://<your ip>/webdav/<your share>
```

Based on your first post I would guess that 

```
https://192.168.1.15/webdav/Volume_1
```

is a working WebDAV URL.

Best Regards,

Holger

----------

## augustin2

Hi Holger

Thank you.

I missed that in the doc.

I tried the url the way you say:

(both Volume_1 and Volume_1/jaaf are declared shares)

http://192.168.1.15/webdav/Volume_1/jaaf

https://192.168.1.15/webdav/Volume_1/jaaf

http://192.168.1.15/webdav/Volume_1/

https://192.168.1.15/webdav/Volume_1/

I still get a Not found 404 error.

But this is not my main concern as I can reach these shares from the admin page.  My main concern now  is, as the previous way is not very convenient,  to be able to see the shares as normal drives in nautilus. This  is possible in Ubuntu and Debian via cifs but not in my Gentoo.

----------

