What I am trying to do?
making the https://dav.example.com/ automount on startup and without asking user credentials.
what steps I've undertaken?
I followed official archlinux wiki to setup my davs
steps:
- installed davfs2
added myself to group "network":
usermod -a -G network myusernameadded webdav server to
/etc/fstab:
https://webdav.example.com /home/username/webdav davfs user,noauto,uid=username,file_mode=600,dir_mode=700 0 1
- created secret file in my
/home/username/and added credentials:
mkdir ~/.davfs2/
echo "https://webdav.example.com webdavuser webdavpassword" >> ~/.davfs2/secrets
chmod 0600 ~/.davfs2/secrets - mounted my dav
mount ~/MyDav
what happens?
When restart my pc and when startup has been completed I open nautilus but webdav server is not mounted. I have to mount it manually from the terminal on each restart. This is normal because I set noauto in fstab line. However, If I set auto instead, it will mount but fail in the process and return error on boot because mounting require internet connection therefore return error "failed mounting". So both auto and noauto have the same results for me.
What I need now is to make webdav server automount when internet connection has been established.
some suggested using _netdev on fstab line. I did, but no change.
Maybe worthmentioning that when I run mount ~/MyWebDav from the terminal it mount without asking credintials, but when run mount -a it ask for credintials and mount if they are correct.
I need to make the webdav server https://dav.example/ automount on startup only when internet connection has been occurred.