Auto mount WebDAV folder

1

I want to auto mount WebDAV folder with a bash script. My server resources are very poor so I have a memory problem with WebDAV. Therefore, I have to umount WebDAV folder to clear cache and memory. But, I have to manually mount WebDAV folders, after that umount command. Because, system ask to me for credentials for WebDAV folder so, I can't do it with a bash script.

I edited ~/.davfs/secret file as follows:

http://<webdav address> username password

after that, I uncommented line secrets ~/.davfs2/secret in /etc/davfs2/davfs2.conf file.

But, system still asks to me for credentials.

How can I auto mount WebDAV?

Orcun

Posted 2014-01-17T07:49:29.683

Reputation: 31

Answers

0

I got this working by keeping everything in /etc/davfs2/, i.e. both the secrets file and the davfs2.conf. A corresponding mount point in /etc/fstab that looks similar

https://dav.example.com/path/to/store /mnt/ davfs file_mode=0664,dir_mode=2775 0 0

allows me to mount the store with mount /mnt. I used the arch linux page as a guide.

This question also seems to be related. The davfs2 configuration supports a different set of options, depending on whether the config is in /etc/davfs2, or in ~/.davfs2. Not entirely intuitive... :(

flooose

Posted 2014-01-17T07:49:29.683

Reputation: 153