mount.davfs(8) | 1.6.0 | mount.davfs(8) |
mount.davfs - Mount a WebDAV resource as davfs2 file system
mount.davfs [-h | --help] [-V | --version]
mount {dir | webdavserver}
mount -t davfs [-o option[,...]]
webdavserver dir
mount.davfs [-o option[,...]] webdavserver dir
mount.davfs allows you to mount the WebDAV resource identified by webdavserver into the local filesystem at dir. WebDAV is an extension to HTTP that allows remote, collaborative authoring of Web resources, defined in RFC 4918. mount.davfs is part of davfs2.
davfs2 allows documents on a remote Web server to be edited using standard applications. For example, a remote Web site could be updated in-place using the same development tools that initially created the site. Or you may use a WebDAV resource for documents you want to access and edited from different locations.
davfs2 supports TLS/SSL (if the neon library supports it) and proxies. mount.davfs runs as a daemon in userspace. It integrates into the virtual file system by the fuse kernel files system. Currently FUSE_KERNEL_VERSION 7 is supported.
mount.davfs is usually invoked by the mount(8) command when using the -t davfs option. After mounting it runs as a daemon. To unmount the umount(8) command is used.
webdavserver is the URL of the server. It must at least contain the host name. It may additionally contain the scheme, the port and the path. Missing components are set to sensible default values. The path component must not be %-encoded, but when entering the URL at the command line or in /etc/fstab the escaping rules of the shell or fstab must be obeyed.
dir is the mountpoint where the WebDAV resource is mounted on. It may be an absolute or relative path.
fstab may be used to define mounts and mount options as usual. In place of the device the url of the WebDAV server must be given. There must not be more than one entry in fstab for every mountpoint.
mount.davfs needs root privileges for mounting. But running a daemon, that is connected to the internet, with root privileges is a security risk. So mount.davfs will change its uid and gid when entering daemon mode.
When invoked by root mount.davfs will run as user davfs2 and group davfs2. This may be changed in /etc/davfs2/davfs2.conf.
When invoked by an ordinary user it will run with the id of this user and with group davfs2.
As the file system may be mounted over an insecure internet connection, this increases the risk that malicious content may be included in the file system. So mount.davfs is slightly more restrictive than mount(8).
Options nosuid and nodev will always be set; even root can not change this.
For ordinary users to be able to mount, they must be member of group davfs2 and there must be an entry in fstab.
When the mount point given in fstab is a relative file name and the file system is mounted by an unprivileged user, the mount point must lie within the home directory of the mounting user.
If in fstab option uid and/or gid are given, an ordinary user can only mount, if her uid is the one given in option uid and he belongs to the group given in option gid.
WARNING: If root allows an ordinary user to mount a file system (using fstab) this includes the permission to read the associated credentials from /etc/davfs2/secrets as well as the private key of the associated client certificate and the mounting user may get access to this information. You should only do this, if you might as well give this information to the user directly.
Special characters like spaces in pathnames are a mess. They are interpreted differently by different programs and protocols, and there are different rules for escaping.
In fstab spaces must be replaced by a three digit octal escape sequence. Write http://foo.bar/path\040with\040spaces instead of http://foo.bar/path with spaces.
For the davfs2.conf and the secrets files please see the escape and quotation rules described in the davfs2.conf(5) man page.
On command line you must obey the escaping rules of the shell.
mount.davfs tries to reduce HTTP-trafic by caching and reusing data. Information about directories and files are held in memory, while downloaded files are cached on disk.
mount.davfs needs to hold a local copy of all open files in the cache directory. Please make sure that enough local disk space is available.
mount.davfs will consider cached information about directories and file attributes valid for a configurable time and look up this information on the server only after this time has expired (or there is other evidence that this information is stale). So if somebody else creates or deletes files on the server it may take some time before the local file system reflects this.
This will not affect the content of files and directory listings. Whenever a file is opened, the server is looked up for a newer version of the file. Please consult the manual davfs2.conf(5) to see how can you configure this according your needs.
WebDAV introduced locks and mount.davfs uses them by default. This will in most cases prevent two people from changing the same file in parallel. But not always:
You might have disabled locks in /etc/davfs2/davfs2.conf or ~/.davfs2/davfs2.conf.
The server might not support locks (they are not mandatory).
A bad connection might prevent mount.davfs from refreshing the lock in time.
Another WebDAV-client might use your lock (that is not too difficult and might even happen without intention).
mount.davfs will therefore check if the file has been changed on the the server before it uploads a new version. If it finds it impossible to upload the locally changed file, it will store it in the local backup direcotry lost+found. You should check this directory from time to time and decide what to do with this files.
Sometimes locks held by some client on the server will not be released. Maybe the client crashes or the network connection fails. When mount.davfs finds a file locked on the server, it will check whether the lock is held by mount.davfs and the current user, and if so tries to reuse and release it. But this will not always succeed. So servers should automatically release locks after some time, when they are not refreshed by the client.
WebDAV allows one to lock files that don't exist (to protect the name when a client intends to create a new file). This locks will be displayed as files with size 0 and last modified date of 1970-01-01. If this locks are not released properly mount.davfs may not be able to access this files. You can use cadaver(1) <http://www.webdav.org/cadaver/> to remove this locks.
davfs2 implements Unix permissions for access control. But changing owner and permissions of a file is only local. It is intended as a means for the owner of the file system, to control whether other local users may acces this file system.
The server does not know about this. From the servers point of view there is just one user (identified by the credentials) connected. Another WebDAV-client, connected to the same server, is not affected by this local changes.
There is one exception: The execute bit on files is stored as a property on the sever. You may think of this property as an information about the type of file rather than a permission. Whether the file is executable on the local system is still controlled by mount options and local permissions.
When the file system is unmounted, attributes of cached files (including owner and permissions) are stored in cache, as well as the attributs of the direcotries they are in. But there is no information stored about directories that do not contain cached files.
mount.davfs will try to create missing directories, but it will not touch /etc/davfs2.
Non root user (e.g. filomena):
To allow an ordinary user to mount there must be an entry in fstab
If a proxy must be used this should be configured in /etc/davfs2/davfs2.conf
Credentials are stored in /home/filomena/.davfs2/secrets
Now the WebDAV resource may be mounted by user filomena invoking
and unmounted by user filomena invoking
Root user only:
Mounts the resource https://asciigirl.com/webdav at mount point /mount/site, encrypting all traffic with SSL. Credentials for http://webdav.org/dav will be looked up in /etc/davfs2/secrets, if not found there the user will be asked.
Mounts the resource http://linux.org.ar/repos at /dav.
davfs2 does not support links.
A davfs2 file system cannot be moved with mount --move.
This man page was written by Luciano Bello <luciano@linux.org.ar> for Debian, for version 0.2.3 of davfs2.
It has been updated for this version by Werner Baumann <werner.baumann@onlinhome.de>.
davfs2 is developed by Sung Kim <hunkim@gmail.com>.
Version 1.0.0 (and later) of davfs2 is a complete rewrite by Werner Baumann.
http://savannah.nongnu.org/projects/davfs2
umount.davfs(8), davfs2.conf(5), mount(8), umount(8), fstab(5)
2020-08-03 | davfs2 |