# mounting davfs2 with regular user

## elmar283

Yesterday I posted a question about strange behaviour with mount a davfs2 filesystem:

https://forums.gentoo.org/viewtopic-t-882253-highlight-davfs2.html.

The problem was solved with using https:// instead of http://.

Now I went on mounting https://idisk.me.com/elmarotter as a regular user.

Strange thing is that this works fine, but that I do get an errormessage:

```

elmarotter@masterserver ~/.davfs2 $ mount /mnt/idisk

cp: cannot stat `/usr/share/davfs2/davfs2.conf': No such file or directory

```

Somehow davfs2 thinks the configurationfile must be in '/usr/share/davfs2' instead of in '/etc/davfs2'.

Does anyone know why this is and how tot solve this. Or it might be a bug that needs to be reported. If so I will do so, but first I would like to know it's not something I did wrong.

This is what I did to mount as regular user:

```

mkdir ~/.davfs2

sudo cp /etc/davfs2/secrets ~/.davfs2

sudo chown elmarotter:elmarotter ~/.davfs2/secrets

chmod 600 ~/.davfs2/secrets

nano -w ~/.davfs2/secrets

```

Made a line like this:

```

https://idisk.me.com/elmarotter elmarotter <password>

```

Then I made line in '/etc/fstab':

```

sudo nano -w /etc/fstab

# Idisk mount

https://idisk.me.com/elmarotter /mnt/idisk davfs rw,user,noauto 0 0

```

Changed permissions and added myself to the group users:

```

sudo usermod -aG users elmarotter

sudo chmod 1774 /var/run/mount.davfs

sudo chown root:users /var/run/mount.davfs

```

Then I mounted '/mnt/idisk' as regular user:

```

elmarotter@masterserver ~/.davfs2 $ mount /mnt/idisk

cp: cannot stat `/usr/share/davfs2/davfs2.conf': No such file or directory

elmarotter@masterserver ~/.davfs2 $ ls -la /mnt/idisk

total 863

drwxr-xr-x 18 elmarotter elmarotter    736 Jun 12 17:04 .

-rw-r--r--  1 elmarotter elmarotter  64393 Dec 20  2008 About your iDisk.rtf

drwxr-xr-x  3 elmarotter elmarotter      0 Aug 13  2010 Applications

drwxr-xr-x  2 elmarotter elmarotter      0 Jul  8  2007 Backup

drwxr-xr-x  3 elmarotter elmarotter      0 Jun 12 17:04 Backups

drwxr-xr-x  3 elmarotter elmarotter      0 May  2 08:23 Data

drwxr-xr-x  2 elmarotter elmarotter      0 Dec 16  2008 Desktop

drwxr-xr-x  2 elmarotter elmarotter      0 May  2 08:23 Documents

drwxr-xr-x  2 elmarotter elmarotter      0 Nov 30  2006 Groups

drwxr-xr-x  6 elmarotter elmarotter      0 Feb 27 21:46 Library

drwxr-xr-x  2 elmarotter elmarotter      0 Nov 30  2006 Movies

drwxr-xr-x  2 elmarotter elmarotter      0 Aug 13  2010 Music

-rw-r--r--  1 elmarotter elmarotter   3773 Nov 29  2010 Naamloos.rtf

-rw-r--r--  1 elmarotter elmarotter 716446 Nov 29  2010 Over stapels.pdf

drwxr-xr-x  2 elmarotter elmarotter      0 Jun 12 16:45 Pictures

drwxr-xr-x  2 elmarotter elmarotter      0 Jun 13 02:49 Public

drwxr-xr-x  3 elmarotter elmarotter      0 Jan 16 23:35 Sites

drwxr-xr-x  3 elmarotter elmarotter      0 Apr 15  2010 Software

drwxr-xr-x  4 elmarotter elmarotter      0 Aug 12  2007 Web

-rw-r--r--  1 elmarotter elmarotter  96598 Nov 29  2010 amendement.pages

drwx------  2 elmarotter elmarotter      0 Jun 13 13:57 lost+found

elmarotter@masterserver ~/.davfs2 $ 

```

As you can see, it's working fine. But I don't like errormessages. So if anyone knows why this errormessage comes up or even better howto solve it, I would be happy to hear about it   :Very Happy:  .

And my inspiration to my steps: http://ubuntuforums.org/archive/index.php/t-77935.html

----------

## noisebleed

Hi elmar283. I'm hitting the same issue. Did you solved it? How?

Thanks.

----------

