I use pam_mount to mount davfs shares this way:
<volume user="username" fstype="davfs" path="https://owncloud.mywebsite.com/remote.php/webdav/" mountpoint="~/Owncloud"
options="uid=username,gid=username_group,dir_mode=0700,file_mode=0700" />
The problem is that the share is not unmounted when users logout.
Setting debug to 2 does not output anything on logout (neither stderr nor /var/log/syslog). This is not normal and may be my fault (even though I
don't understand what could be wrong). Anyway, it makes it harder to debug.
From the man page of pam_mount.conf.xml, I see that certain filesystem need to be unmounted using custom umount commands (ex.
<cryptumount>umount.crypt %(MNTPT)</cryptumount>). There is nothing in the man page regarding davfs. Because davfs2 uses umount.davfs to unmount
shared, I tried adding <umount>/sbin/umount.davfs %(MNTPT)</umount> at the end of the conf file, without results.
Setting <logout wait="2000" hup="0" term="1" kill="1" /> did not help either.
I'm using davfs2 1.5.2-1 to manage davfs.
Feel free to ask for more infos if needed.