man mount.davfs (Administration système) - Mount a WebDAV resource in a directory

NAME

mount.davfs - Mount a WebDAV resource in a directory

SYNOPSIS

mount.davfs [-h | --help] [-V | --version]

mount {dir | webdavserver}

SYNOPSIS (root only)



mount -t davfs [-o option[,...]] webdavserver dir

mount.davfs [-o option[,...]] webdavserver dir

DESCRIPTION

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 2518. 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. DAVFS2 supports SSL and proxies. DAVFS2 code is based on uservfs(uservfs.sf.net). It uses the coda file system for VFS and the neon library for WebDAV operations.

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 must be a complete url, including scheme, Fully Qualified Domain Name and path. Scheme may be http or https. If the path contains spaces or other characters, that might be intrerpreted by the shell, the url must be enclosed in double quotes (e.g. "http://foo.bar/name with spaces"). But see URL WITH SPACES.

dir is the mountpoint where the WebDAV resource is mounted on.

/etc/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 two entries in fstab with type davfs and identical mountpoint.

Ordinary users may only mount when there is an entry in /etc/fstab and the user option is set. They must also belong to group users.

FILE PERMISSIONS

For security reasons only the user that mounted the file system (and root) are allowed to use the file system. All files and directories belong to the mounting user. All file modes are 600, all directory modes are 700. It is not possible to change them.

OPTIONS

-V --version
Output version.
-h --help
Print a help message.
-o
A comma-separated list defines mount options to be used. Available options are:
ro
Mount the file system read-only. Default: rw.
rw
Mount the file system read-write. Default: rw.
[no]user
(Do not) allow an ordinary user to mount the file system. The name of the mounting user is written to mtab so that he can unmount the file system again. This option implies the options noexec, nosuid, and nodev. This option makes only sense when set in fstab. Default: ordinary users are not allowed to mount.
users
Same as user.
proxy=proxysettings
Allows for the specification of proxy settings. proxy settings must be the Fully Qualified Domain Name. The port may be appended separated by a colon.
[no]useproxy
(Do not) use a proxy. Default: proxy, if a proxy is specified.
[no]askauth
(Do not) ask interactivly for credentials for the WebDAV server or the proxy if they are not found in the secrets file. Default: ask.
[no]locks
(Do not) lock files on the WebDAV server. Default: locks.
[no]mountanyway
(Do not) mount even when the connection to the WebDAV server failed. If the file system is mounted without connection, operations on the file system will result in an I/O-Error. But when the server becomes reachable, everything will work. Default: nomountanyway.

FILES

/etc/davfs2/davfs2.conf
System wide configuration file. At the moment it is only used to configure the proxy to be used.
~/.davfs2/davfs2.conf
Configuration file in the users home directory to configure the proxy. The user configuration takes precedence over the system wide configuration.
/etc/davfs2/secrets
Holds the credidentials for WebDAV servers and the proxy. The file must be read-writable by root only.
~/.davfs2/secrets
Holds credidentials for WebDAV servers and proxy. The file must be read-writable by the owning user only. Credidentials are allways first looked up in the home directory of the user that mounts. If not found there the system wide secrets file is consulted. If no credentials are found they are asked from the user interactively (unless the noaskauth option is given).

The name of the WebDAV server must be character by character identical in fstab, secrets and on the command line, whatever you use.

/var/run/mount.davfs/
PID-files of running mount.davfs processes are stored there. This directory must belong to group users with write permissions for the group and the sticky-bit set (mode 1775). The PID-files are named after the device special file that is used for communication between kernel coda file system and mount.davfs (e.g davfs0.pid).

ENVIRONMENT

http_proxy
If no proxy is defined by option or in the configuration files the value of this environment variable is used.

URL WITH SPACES

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 /etc/fstab spaces are impossible, so urls with spaces must be http-escaped. Write http://foo.bar/path%20with%20spaces instead of http://foo.bar/path with spaces.

In secrets you might use quotation, but the url must be character by character identical to the one in /etc/fstab.

On command line you must obey the escaping rules of the shell and make shure: after intrepretation by the shell, it must look exactly like in /etc/fstab or secrets, if you need this files.

If you don't need /etc/fstab you might write http://foo.bar/path\ with\ spaces or "http://foo.bar/path with spaces" on command line and "http://foo.bar/path with spaces" in secrets.

Confused ? So am I.

EXAMPLES

Non root user:
To allow an ordinary user to mount there must be an entry in /etc/fstab
http://webdav.org/dav /media/dav davfs user,auto 0 0
If a proxy must be used this should be configured in /home/filomena/.davfs2/davfs2.conf
proxy proxy.mycompany.com:8080
Credentials are stored in /home/filomena/.davfs2/secrets
proxy.mycompany.com filomena "my secret"

http://webdav.org/dav davuser password
Now the WebDAV resource may be mounted by user filomena invoking
mount /media/dav

or

mount http://webdav.org/dav
and unmounted by user filomena invoking
umount /media/dav

or

umount http://webdav.org/dav
Root user:
mount https://asciigirl.com/webdav /mount/site
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 asked interactively.
mount.davfs http://linux.org.ar/repos/ /dav > coda.log 2>webdav.log
mounts the resource http://linux.org.ar/repos at /dav, and saves logs to coda.log and errors to webdav.log

BUGS

- Davfs2 does not support the use of chmod(2) or link(2) on its files.

- Temporary files may not be cleaned up properly from /tmp.

AUTHORS

This page was written by Luciano Bello <luciano@linux.org.ar> for Debian, for version 0.2.3 of davfs2.

It was updated for version 0.2.4 by Werner Baumann <wbaumann@users.sourceforge.net>.

DAVFS2 is developed by Sung Kim <hunkim@gmail.com>. http://dav.sourceforge.net/

SEE ALSO