Configuration file for mount.davfs
There is a system wide configuration file /etc/davfs2/davfs2.conf and user configuration files ~/.davfs2/davfs2.conf. When mount.davfs is invoked by root, only the system wide configuration file is read. When invoked by an ordinary user, the user configuration file is read in addition. Settings from the user configuration file will take precedence over the system wide configuration.
The configuration file consists of lines where each line contains a keyword value pair. Keyword and value are seperated by spaces and/or tabs.
The file may contain sections that are for one specific mount point only. Such a section starts with a line, that contains the full path of the mount point enclosed in square brackets. The section ends at the start of the next section or the end of file. Options that shall apply to all mounted file system must come before the first sections. Options given in a mount specific section will have precedence.
kernel_fs coda
proxy foo.bar:8080
use_locks 0
[/media/dav]
use_locks 1
[/home/otto/mywebspace]
gui_optimize 1
All mounted davfs2 file systems will use the coda kernel file system and the proxy foo.bar. All davfs2 file systems expect /media/dav will disable the use of the locks. /home/otto/mywebspace will use the gui_optimize option.
Lines that only contain spaces and tabs (empty lines) are ignored.
# indicates a comment. The rest of the line is ignored.
\(rs is the escape character.
"" is used for quotation.
If a value contains one of the special characters space, tab, #, \(rs, or ", this character must be escaped by a preceding \(rs. Use \(cq\(rs \(cq instead of \(cq \(cq, \(cq\(rs#\(cq instead of \(cq#\(cq, \(cq\(rs\(rs\(cq instead of \(cq\(rs\(cq and \(cq\(rs"\(cq instead of \(cq"\(cq.
Values containing spaces, tabs or # may instead be enclosed in double quotes. But " and \(cq must be escaped even within double quotes. If the starting line of a section is enclosed in double quotes, the square brakets must be within the quotes (like "[/home/otto/with space]").
Boolean option values (yes/no) must be given as numerical value. 0 for no, 1 for yes.
dav_user
When invoked by root the mount.davfs daemon will run as this user. Value must be given as name, not as numerical id.
Default: davfs2
Only allowed in the system wide configuration file.
dav_group
The group of the running mount.davfs daemon. Ordinary users must be member of this group in order to mount a davfs2 file system. Value must be given as name, not as numerical id.
Default: davfs2
Only allowed in the system wide configuration file.
kernel_fs
Which kernel file system to use, to integrate into the virtual file system. Possible values are fuse and coda.
Default: fuse
buf_size
Size in KiByte of the buffer used to communicate with the kernel file system. Only usefull with fuse, where read and write operations may profit from a larger buffer.
Default: 16
use_proxy
Whether to use a proxy to connect to the WebDAV server. 0 = no, 1 = yes. If no proxy is defined in the configration file or the environment variables https_proxy, http_proxy and all_proxy, this option has no effect.
Default: 1
Only allowed in the system wide configuration file.
proxy
Name of the proxy. The name must be the fully qualified domain name (no scheme). If the proxy port differs from the default of 8080, it must be appended, seperated by a colon. Examples: foo.bar:1704 or foo.bar
Only allowed in the system wide configuration file.
trust_ca_cert
Name of a certificate file in PEM format. The name of the file may be given as absolute path or as file name only. In the latter case the directories ~/.davfs2/certs and /etc/davfs2/certs will be searched.
This option is useful when the certificate presented by the server cannot be verified using the system's data base of trusted certificate authorities (CA). The certificate file must contain the self-signed certificate of the top level CA in the chain of trust. It may be a self-signed server certificate (but see also trust_server_cert). With this option the system's CA data base is ignored.
Note: Even if the server's certificate is trusted that does not mean it is accepted. Additionally the certificate's date must be valid and either the CommonName or the SubjectAltName must match the host name of the server.
servercert
Same as trust_ca_cert but badly named.
Deprecated
trust_server_cert
Name of a certificate file in PEM format. The name of the file may be given as absolute path or as file name only. In the latter case the directories ~/.davfs2/certs and /etc/davfs2/certs will be searched.
Usefull when the server's certificate can't be verified or is even invalid, but you know that you can trust this certificate. When the server presents a certificate that is exactly equal to this one and when the server is able to authenticate against the public key contained in this certificate the connection will be established.
This is the preferred option for self signed server certificates.
No other ways to verify the certificate will be tried and the certificate will not be checked for validity.
clientcert
Name of a certificate in PKCS#12 format that will be used to authenticate with the server. The name of the file may be given as absolute path or as file name only. In the latter case the directories ~/.davfs2/certs/private and /etc/davfs2/certs/private will be searched.
secrets
Name of a file that holds the credentials for servers and the proxy, and passwords to decrypt the client certificate. The name must be an absolute path. The file must be read and writable by the owner only (mode 600).
Default: ~/.davfs2/secrets
Only allowed in the user configuration file. The system wide secrets file is allways /etc/davfs2/secrets.
ask_auth
Ask the user interactively for credentials and passwords if not found in the secretsfile. Ask the user if a servercert cannot be verified. 0 = no, 1 = yes.
Default: 1
use_locks
Whether to lock files on the server when they are opened for writing. 0 = no, 1 = yes.
Default: 1
lock_owner
A string send to the server to identify the owner of a lock. If a WebDAV resource is used at the same time by different clients using the same credentials, different values for lock_owner should be choosen.
Default: the username from the credentials
lock_timeout
How long in seconds locks should be valid, before the server removes them. The server may ignore this and set its own timeout value.
Default: 1800
lock_refresh
That many seconds before the lock times out, mount.davfs will try to refresh the lock. The value should be substantially greater than delay_upload.
Default: 60
use_expect100
To avoid uploading big files that will be refused by the server, mount.davfs uses the header expect: 100-continue to get the o.k. from the server before uploading. Not all servers understand this. 0 = no, 1 = yes.
Default: 0
if_match_bug
Some servers do not handle If-Match and If-None-Match-headers correctly. This otion tells mount.davfs to use HEAD instead of thes headers. 0 = no, 1 = yes.
Default: 0
drop_weak_etags
Popular servers send a weak etag whenever they are not able to calculate a strong one. This weak etag will never be valid, but after one second it is silently turned into a strong, valid etag. With this flag set to 1, mount.davfs will never use this weak etags. If the flag is 0, the weakness indicator will be removed and the etag is assumed to be strong. There is some danger of the Lost-Update-Problem with this. But it is minimized when using locks.
You should turn this on, when you can't use locks and there is the danger of concurrent access to the same resource. In this case the etag is not used at all and the resource cannot be cached.
0 = no, 1 = yes.
Default: 0
n_cookies
Some servers will only work when they are allowed to set a cookie and this cookie is returned in subsequent requests. This option sets the number of cookies you are willing to accept and include in subsequent requests. davfs2 will only care for the name and the value of the cookie and ignore all of the possible attributes.
Default: 0
precheck
If option if_match_bug is set: use HEAD-requests to check for existence or modification of a file to avoid unintended overwriting what somebody else changed. Has no effect if option if_match_bug is 0. You should only set it 0, if there is no concurrent access to the server. 0 = no, 1 = yes.
Default: 1
ignore_dav_header
Some servers send wrong information about their capabilities in the DAV-header. In this case the header should be ignored.
Default: 0
use_compression
Use gzip-compression for downloading files, if supported by the server. Uploads will still be uncompressed.
Default: 0
min_propset
Some servers are reported to significantly slow down when the Etag and Last-Modified properties are requested. This option will reduce the set of WebDAV-properties requested from the server to the minimal set. Don't use it if your file system is used for reading and writing. Without Etag or Last-Modified davfs2 will not be able to check for changes on the server which may result in unnecessary downloads and lost updates. This option will also effectively disable caching of files because files in the cache can't be reused.
Default: 0
follow_redirect
If the server redirects a GET-request to a different resource (maybe on a different server) then follow this redirection.
Currently there are some restrictions: all redirects are treated as temporary redirects; if the new server requires authentication then the same credentials are use as for the original server; if the connection is over TLS the server certificate will be checked against the trusted CAs known by the system; user configured server certificates and client certificates are not used for the new server.
Default: 0
server_charset
When extracting file names from the path component of the URL, mount.davfs will assume they are encoded using this character set and translate file names to the local character set. This is not about encoding of file contents and not about HTTP escaping rules.
There is no means in HTTP to know the character encoding of the path component. There may be even different encodings within the same path, as the encoding of file names is often defined by the clients that created them. Nowadays it is best to use only UTF-8 encoding and to do no conversion. If you are not sure that all clients understand UTF-8, restrict file names to pure us-ascii. Never use characters in file names, that may have a special function on some operating systems (like /, : and \(rs).
Default: no character set conversion
connect_timeout
When creating a TCP connection to the server mount.davfs will wait that many seconds for an answer before assuming an error. If a value of '0' is used then no explicit timeout handling is set and the connect call will only timeout as dictated by the TCP stack.
This parameter only takes effect if the version of neon in use (neon version > 0.26) and the OS support non-blocking I/O.
Default: 10
read_timeout
How long in seconds mount.davfs will wait for an answer from the server before assuming an error.
Default: 30
retry
When mount.davfs can not reach the server it will try again after retry seconds. For subsequent retries the interval will be increased up to max_retry seconds.
Default: 30
max_retry
Maximum value of the retry interval.
Default: 300
max_upload_attempts
When uploading a changed file fails temporarily mount.davfs will retry with increasing intervals, but not more often than this.
With a bad connection this will cause additional traffic. To reduce traffic caused by unsuccessful attempts option use_expect100 can be set. But please test it. Most proxies and some servers don't support this header.
Default: 15
add_header
Your server might expect special headers to do what you want. Different from other options, this one takes two values: the name of the header and its value. Some ASP-backends to IIS seem to require the Microsoft specific header "Translate: F". You can add it like this:
add_header Translate F
mount.davfs will add header "Translate: F" on all requests.
This option is cumulative. You can enter more than one add_header option and all of them will be added. Also add_header options from /etc/davfs2/davfs2.conf and ~/.davfs2/davfs2.conf are merged.
backup_dir
Each mounted davfs2 file system has a directory to store backups of files that could not be stored back to the server. This sets the name of this directory. You should regularly check this directory.
Default: lost+found
cache_dir
The directory where mount.davfs will store cached files. For every mount point a subdirectory will be created.
In the systemwide configuration file this will set the system wide cache, used by root. In a users configuration file it will set the cache used by this user.
Defaults: /var/cache/davfs2 and ~/.davfs2/cache
cache_size
The amount of disk space in MiByte that may be used. mount.davfs will always take enough space to cache open files, ignoring this value if necessary.
Default: 50
table_size
mount.davfs maintains a hash table with an entry for each known file or directory. This gives the number of entries in this table. For large file systems (more than some hundreds of files) increasing this number may speed up file operations. The value should be a power of 2.
Default: 1024
dir_refresh
After mount.davfs has got information about files in a directory it considers it valid for this time in seconds. Note: This does not affect opening of files and reading a directory by an application.
Default: 60
file_refresh
When a file or directory is opened by an application, mount.davfs will first check the server for a newer version. But some applications do open calls on the same file in short sequence. To avoid unecessary traffic mount.davfs will wait that many seconds before it send a new request for the same information.
Default: 1
delay_upload
When a file that has been changed is closed, mount.davfs will wait that many seconds before it will upload it to the server. This will avoid uploading of temporary files that will be removed immediately after closing. If you need the files to appear on the server immediately after closing, set this option to 0.
Default: 10
gui_optimize
When a file is opened, mount.davfs will have to check the server whether there is a newer version. Graphical User Interfaces tend to open just any file, slowing down things dramatically for large directories. With this option mount.davfs will try to get this information from all files in a directory with one PROPFIND request. 0 = no, 1 = yes.
Default: 0
minimize_mem
davfs2 holds information about files and directories in the working memory. It will stay there as long as the file system is mounted and the file is not deleted. By this memory usage by davfs2 will grow over time and may slow down davfs2. With this option set to 1 davfs2 will regularly clean the memory from information that has not be used for some time. 0 = no, 1 = yes.
Warning: Most file attributes are only maintained locally because there is no corresponding WebDAV property. So if users change attributes (owner, group, access bits) locally this changes will be lost and attribute values will be reset to the default values.
Default: 0
debug
Send debug messages to the syslog daemon. The value tells what kind of information shall be logged. The messages are send with facility LOG_DAEMON and priority LOG_DEBUG. It depends from the configuration of the syslog daemon where the messages will go (propably /var/log/messages, /var/log/syslog or /var/log/daemon.log). Whether HTTP related debug messages are available depends on your neon library.
Unlike other options, this option is cumulative. If there are several debug entries with different values, all of them will be applied. Also debug options from /etc/davfs2/davfs2.conf and ~/.davfs2/davfs2.conf are merged.
Note: Debug messages let the log-files grow quickly. Never use this option in normal operation of mount.davfs.
Default: no debugging messages
Recognized values:
config
Command line and configuration options.
kernel
Upcalls from the kernel file system.
cache
Cache operations like adding and removing nodes.
http
HTTP headers.
xml
Parsing of the XML-body of WebDAV-requests.
httpauth
Negotiation of authentication.
locks
Information about locks.
ssl
TLS/SSL related stuff like certificates.
httpbody
Complete body of HTTP-responses.
secrets
Also print confidential information, which is usually omitted or obscured.
most
Includes config, kernel, cache and http.
This man page was written by by Werner Baumann <[email protected]>.
http://savannah.nongnu.org/projects/davfs2