1mount.davfs(8)                       1.6.0                      mount.davfs(8)
2
3
4

NAME

6       mount.davfs - Mount a WebDAV resource as davfs2 file system
7
8
9

SYNOPSIS

11       mount.davfs [-h | --help] [-V | --version]
12       mount {dir | webdavserver}
13
14
15

SYNOPSIS (root only)

17       mount -t davfs [-o option[,...]] webdavserver dir
18       mount.davfs [-o option[,...]] webdavserver dir
19
20
21

DESCRIPTION

23       mount.davfs  allows you to mount the WebDAV resource identified by web‐
24       davserver into the local filesystem at dir.  WebDAV is an extension  to
25       HTTP  that  allows  remote,  collaborative  authoring of Web resources,
26       defined in RFC 4918.  mount.davfs is part of davfs2.
27
28
29       davfs2 allows documents on a remote Web server to be edited using stan‐
30       dard  applications.  For  example,  a  remote Web site could be updated
31       in-place using the same development tools that  initially  created  the
32       site.   Or  you  may  use  a  WebDAV resource for documents you want to
33       access and edited from different locations.
34
35
36       davfs2 supports TLS/SSL (if the neon library supports it) and  proxies.
37       mount.davfs  runs as a daemon in userspace. It integrates into the vir‐
38       tual file system by the fuse kernel files system.  Currently  FUSE_KER‐
39       NEL_VERSION 7 is supported.
40
41
42       mount.davfs  is  usually invoked by the mount(8) command when using the
43       -t davfs option. After mounting it runs as a  daemon.  To  unmount  the
44       umount(8) command is used.
45
46
47       webdavserver  is  the  URL  of the server. It must at least contain the
48       host name. It may additionally contain the scheme,  the  port  and  the
49       path.   Missing components are set to sensible default values. The path
50       component must not be %-encoded, but when entering the URL at the  com‐
51       mand  line  or  in  /etc/fstab the escaping rules of the shell or fstab
52       must be obeyed.
53
54
55       dir is the mountpoint where the WebDAV resource is mounted on.  It  may
56       be an absolute or relative path.
57
58
59       fstab may be used to define mounts and mount options as usual. In place
60       of the device the url of the WebDAV server must be  given.  There  must
61       not be more than one entry in fstab for every mountpoint.
62
63
64

OPTIONS

66       -V --version
67              Output version.
68
69
70       -h --help
71              Print a help message.
72
73
74       -o     A  comma-separated list defines mount options to be used. Avail‐
75              able options are:
76
77
78              [no]auto
79                     Can (not) be mounted with mount -a.
80                     Default: auto.
81
82
83              comment=some comment
84                     This option is ignored by mount.davfs but other  programs
85                     may require it to be present in fstab.
86
87
88              conf=absolute path
89                     An  alternative  user  configuration file. This option is
90                     intended for cases where the default  user  configuration
91                     file in the users home directory can not be used.
92                     Default: ~/.davfs2/davfs2.conf
93
94
95              [no]dev
96                     (Do  not)  interpret character or block  special  devices
97                     on the file system.  This option  is  only  included  for
98                     compatibility  with  the mount(8) program. It will always
99                     be set to nodev
100
101
102              dir_mode=mode
103                     The default mode bits for directories in the mounted file
104                     system.  Value  given in octal. s-bits for user and group
105                     are always silently ignored.
106                     Default: calculated from the umask of the mounting  user;
107                     an x-bit is associated to every r-bit in u-g-o.
108
109
110              [no]exec
111                     (Do   not)  allow   execution   of  any  binaries  on the
112                     mounted file system.
113                     Default: exec. (When mounting as an  ordinary  user,  the
114                     mount(8) program will set the default to noexec.)
115
116
117              file_mode=mode
118                     The  default mode bits for files in the mounted file sys‐
119                     tem. Value given in octal. s-bits for user and group  are
120                     always silently ignored.
121                     Default:  calculated from the umask of the mounting user;
122                     no x-bits are set for files.
123
124
125              gid=group
126                     The group the mounted file system belongs to. It may be a
127                     numeric  ID  or  a  group name. The mounting user, if not
128                     root, must be member of this group.
129                     Default: the primary group of the mounting user.
130
131
132              [no]grpid
133                     When this option is set a newly created  file  will  take
134                     the  group  id  of  the directory in which it is created.
135                     This will also apply to all files that are on the  server
136                     and not in the local cache. (That is because the group id
137                     is not stored on the server.)
138                     If the group id of the directory is root this  option  is
139                     ignored.
140                     Default: nogrpid.
141
142
143              [no]_netdev
144                     The file system needs a (no) network connection for oper‐
145                     ation. This information allows the  operating  system  to
146                     handle  the file system properly at system start and when
147                     the network is shut down.
148                     Default: _netdev
149
150
151              ro     Mount the file system read-only.
152                     Default: rw.
153
154
155              rw     Mount the file system read-write.
156                     Default: rw.
157
158
159              [no]suid
160                     Do not allow set-user-identifier or  set-group-identifier
161                     bits  to  take  effect.  This option is only included for
162                     compatibility with the mount program. It will  always  be
163                     set to nosuid.
164
165
166              [no]user
167                     (Do  not)  allow   an   ordinary  user  to mount the file
168                     system. The name of the mounting user is written to  mtab
169                     so that he can unmount the file system again. Option user
170                     implies the options  noexec,  nosuid  and  nodev  (unless
171                     overridden by subsequent options). This option makes only
172                     sense when set in fstab.
173                     Default: ordinary users are not allowed to mount.
174
175
176              users  Like user, but any user is allowed to  unmount  the  file
177                     system, not only the mounting user. This is generally not
178                     recomended.  If the user option  allows  an  unprivileged
179                     user  to mount, but unmounting by the mounting user fails
180                     the users may be a work around.
181                     Default: only the mounting user is allowed to unmount the
182                     file system.
183
184
185              uid=user
186                     The owner of the mounted file system. It may be a numeric
187                     ID or a user name.  Only when mounted by root,  this  may
188                     be different from the mounting user.
189                     Default: ID of the mounting user.
190
191
192              username=WebDAV_user
193                     Use  this  name  to  authenticate with the WebDAV server.
194                     This option is intended for use with pam_mount only. When
195                     this  option  is set the credentials in the secrets files
196                     will be ignored. The password will always  be  read  from
197                     stdin,  even when option askauth is set to 0.  Do not use
198                     it in fstab. The username will be visible for everyone in
199                     the output of ps.
200                     Default: no username.
201                     Experimental:  This  option  is experimental and might be
202                     removed. If you think it useful and successfully  use  it
203                     please send a short report.
204
205
206

SECURITY POLICY

208       mount.davfs  needs  root privileges for mounting. But running a daemon,
209       that is connected to the internet, with root privileges is  a  security
210       risk.  So  mount.davfs will change its uid and gid when entering daemon
211       mode.
212
213
214              When invoked by root mount.davfs will run  as  user  davfs2  and
215              group davfs2. This may be changed in /etc/davfs2/davfs2.conf.
216
217
218              When invoked by an ordinary user it will run with the id of this
219              user and with group davfs2.
220
221       As the file system may be mounted over an insecure internet connection,
222       this  increases  the risk that malicious content may be included in the
223       file system. So mount.davfs is slightly more restrictive than mount(8).
224
225
226              Options nosuid and nodev will always be set; even root  can  not
227              change this.
228
229
230              For  ordinary  users to be able to mount, they must be member of
231              group davfs2 and there must be an entry in fstab.
232
233
234              When the mount point given in fstab is a relative file name  and
235              the  file  system  is mounted by an unprivileged user, the mount
236              point must lie within the home directory of the mounting user.
237
238
239              If in fstab option uid and/or gid are given,  an  ordinary  user
240              can only mount, if her uid is the one given in option uid and he
241              belongs to the group given in option gid.
242
243       WARNING: If root allows an ordinary user to mount a file system  (using
244       fstab)  this includes the permission to read the associated credentials
245       from /etc/davfs2/secrets as well as the private key of  the  associated
246       client  certificate and the mounting user may get access to this infor‐
247       mation. You should only do this, if you might as well give this  infor‐
248       mation to the user directly.
249
250

URLS AND MOUNT POINTS WITH SPACES

252       Special characters like spaces in pathnames are a mess. They are inter‐
253       preted differently by different programs and protocols, and  there  are
254       different rules for escaping.
255
256
257       In  fstab  spaces  must  be  replaced  by  a  three  digit octal escape
258       sequence.  Write   http://foo.bar/path\040with\040spaces   instead   of
259       http://foo.bar/path with spaces.
260
261
262       For  the  davfs2.conf  and  the secrets files please see the escape and
263       quotation rules described in the davfs2.conf(5) man page.
264
265
266       On command line you must obey the escaping rules of the shell.
267
268
269

CACHING

271       mount.davfs tries to reduce HTTP-trafic by caching  and  reusing  data.
272       Information about directories and files are held in memory, while down‐
273       loaded files are cached on disk.
274
275
276       mount.davfs needs to hold a local copy of all open files in  the  cache
277       directory. Please make sure that enough local disk space is available.
278
279
280       mount.davfs will consider cached information about directories and file
281       attributes valid for a configurable time and look up  this  information
282       on  the server only after this time has expired (or there is other evi‐
283       dence that this information is stale). So if somebody else  creates  or
284       deletes files on the server it may take some time before the local file
285       system reflects this.
286
287
288       This will not affect the content of files and directory listings. When‐
289       ever  a  file is opened, the server is looked up for a newer version of
290       the file.  Please consult the manual davfs2.conf(5) to see how can  you
291       configure this according your needs.
292
293
294

LOCKS, LOST UPDATE PROBLEM AND BACKUP FILES

296       WebDAV introduced locks and mount.davfs uses them by default. This will
297       in most cases prevent two people from changing the same file in  paral‐
298       lel. But not always:
299
300
301              You  might  have  disabled  locks  in /etc/davfs2/davfs2.conf or
302              ~/.davfs2/davfs2.conf.
303
304
305              The server might not support locks (they are not mandatory).
306
307
308              A bad connection might prevent mount.davfs from  refreshing  the
309              lock in time.
310
311
312              Another  WebDAV-client might use your lock (that is not too dif‐
313              ficult and might even happen without intention).
314
315
316       mount.davfs will therefore check if the file has been  changed  on  the
317       the  server  before it uploads a new version. If it finds it impossible
318       to upload the locally changed file, it  will  store  it  in  the  local
319       backup  direcotry lost+found. You should check this directory from time
320       to time and decide what to do with this files.
321
322
323       Sometimes locks held by some client on the server will not be released.
324       Maybe  the  client  crashes  or  the  network  connection  fails.  When
325       mount.davfs finds a file locked on the server, it  will  check  whether
326       the  lock  is held by mount.davfs and the current user, and if so tries
327       to reuse and release it. But this will not always succeed.  So  servers
328       should  automatically  release locks after some time, when they are not
329       refreshed by the client.
330
331
332       WebDAV allows one to lock files that don't exist (to protect  the  name
333       when  a  client  intends to create a new file). This locks will be dis‐
334       played as files with size 0 and last modified date  of  1970-01-01.  If
335       this  locks  are  not  released properly mount.davfs may not be able to
336       access  this   files.   You   can   use   cadaver(1)   <http://www.web
337       dav.org/cadaver/> to remove this locks.
338
339
340

FILE OWNER AND PERMISSIONS

342       davfs2  implements  Unix  permissions  for access control. But changing
343       owner and permissions of a file is only local.  It  is  intended  as  a
344       means  for the owner of the file system, to control whether other local
345       users may acces this file system.
346
347
348       The server does not know about this. From the  servers  point  of  view
349       there  is  just  one  user  (identified  by the credentials) connected.
350       Another WebDAV-client, connected to the same server, is not affected by
351       this local changes.
352
353
354       There  is  one exception: The execute bit on files is stored as a prop‐
355       erty on the sever. You may think of this  property  as  an  information
356       about  the  type  of file rather than a permission. Whether the file is
357       executable on the local system is still controlled by mount options and
358       local permissions.
359
360
361       When  the file system is unmounted, attributes of cached files (includ‐
362       ing owner and  permissions)  are  stored  in  cache,  as  well  as  the
363       attributs  of  the direcotries they are in. But there is no information
364       stored about directories that do not contain cached files.
365
366
367

FILES

369       /etc/davfs2/davfs2.conf
370              System wide configuration file.
371
372
373       ~/.davfs2/davfs2.conf
374              Configuration file in the users home directory.The user configu‐
375              ration  takes  precedence over the system wide configuration. If
376              it does not exist, mount.davfs will will create a template file.
377
378
379       /etc/davfs2/secrets
380              Holds the credentials for WebDAV servers and the proxy, as  well
381              as  decryption  passwords for client certificates. The file must
382              be read-writable by root only.
383
384
385       ~/.davfs2/secrets
386              Holds credentials for WebDAV  servers  and  proxy,  as  well  as
387              decryption  passwords  for client certificates. The file must be
388              read-writable by the owner only. Credentials are first looked up
389              in  the  home directory of the mounting user. If not found there
390              the system wide secrets file is consulted. If  no  creditentials
391              and  passwords  are  found they are asked from the user interac‐
392              tively  (if  not  disabled).  If  the  file  does   not   exist,
393              mount.davfs will will create a template file.
394
395
396       /etc/davfs2/certs
397              You  may store trusted server certificates here, that can not be
398              verified by use of the system wide CA-Certificates. This is use‐
399              ful  when your server uses a selfmade certificate. You must con‐
400              figure  the  servercert  option  in  /etc/davfs2/davfs2.conf  or
401              ~/.davfs2/davfs2.conf  to  use  it.  Certificates must be in PEM
402              format.
403              Be sure to verify the certificate.
404
405
406       ~/.davfs2/certs
407              You may store trusted server certificates here, that can not  be
408              verified by use of the system wide CA-Certificates. This is use‐
409              ful when your server uses a selfmade certificate. You must  con‐
410              figure the servercert option in ~/.davfs2/davfs2.conf to use it.
411              Certificates must be in PEM format.
412              Be sure to verify the certificate.
413
414
415       /etc/davfs2/certs/private
416              To store client certificates. Certificates must  be  in  PKCS#12
417              format.   You   must   configure   the   clientcert   option  in
418              /etc/davfs2/davfs2.conf or ~/.davfs2/davfs2.conf to use it. This
419              directory must be rwx by root only.
420
421
422       ~/.davfs2/certs/private
423              To  store  client  certificates. Certificates must be in PKCS#12
424              format.  You   must   configure   the   clientcert   option   in
425              ~/.davfs2/davfs2.conf  to  use it. This directory must be rwx by
426              the owner only.
427
428
429       /var/run/mount.davfs
430              PID-files of running mount.davfs  processes  are  stored  there.
431              This  directory  must  belong to group davfs2 with write permis‐
432              sions for the group and the  sticky-bit  set  (mode  1775).  The
433              PID-files are named after the mount point of the file system.
434
435
436       /var/cache/davfs2
437              System  wide directory for cached files. Used when the file sys‐
438              tem is mounted by root. It must belong do group davfs2 and read,
439              write  and execute bits for group must be set. There is a subdi‐
440              rectory for every mounted file system. The names of this  subdi‐
441              rectories are created from url, mount point and user name.
442
443
444       ~/.davfs2/cache
445              Cache  directory in the mounting users home directory. For every
446              mounted WebDAV resource a subdirectory is created.
447
448       mount.davfs will try to create missing directories,  but  it  will  not
449       touch /etc/davfs2.
450
451

ENVIRONMENT

453       https_proxy http_proxy all_proxy
454              If  no  proxy  is defined in the configuration file the value is
455              taken from this environment variables. The proxy  may  be  given
456              with or without scheme and with or without port
457              http_proxy=[http://]foo.bar[:3218]
458              Only used when the mounting user is root.
459
460
461       no_proxy
462              A  comma  separated  list of domain names that shall be accessed
463              directly.  * matches any domain name.  A  domain  name  starting
464              with .  (period) matches all subdomains.
465              Only used when the mounting user is root.
466              Not applied when the proxy is defined in /etc/davfs2.
467
468
469

EXAMPLES

471       Non root user (e.g. filomena):
472
473
474       To allow an ordinary user to mount there must be an entry in fstab
475              http://webdav.org/dav   /media/dav   davfs   noauto,user   0   0
476
477
478       If   a   proxy   must   be   used   this   should   be   configured  in
479       /etc/davfs2/davfs2.conf
480              proxy   proxy.mycompany.com:8080
481
482
483       Credentials are stored in /home/filomena/.davfs2/secrets
484              proxy.mycompany.com     filomena  "my secret"
485              /media/dav   webdav-username   password
486
487
488       Now the WebDAV resource may be mounted by user filomena invoking
489              mount /media/dav
490
491
492       and unmounted by user filomena invoking
493              umount /media/dav
494
495
496       Root user only:
497
498
499       Mounts  the  resource  https://asciigirl.com/webdav  at   mount   point
500       /mount/site,   encrypting   all   traffic  with  SSL.  Credentials  for
501       http://webdav.org/dav will be looked up in /etc/davfs2/secrets, if  not
502       found there the user will be asked.
503              mount  -t  davfs  -o  uid=otto,gid=users,mode=775  https://asci
504              igirl.com/webdav /mount/site
505
506
507       Mounts the resource http://linux.org.ar/repos at /dav.
508              mount.davfs            -o            uid=otto,gid=users,mode=775
509              http://linux.org.ar/repos/ /dav
510
511
512

BUGS

514       davfs2 does not support links.
515
516       A davfs2 file system cannot be moved with mount --move.
517
518
519

AUTHORS

521       This  man  page was written by Luciano Bello <luciano@linux.org.ar> for
522       Debian, for version 0.2.3 of davfs2.
523
524
525       It has been updated for this version  by  Werner  Baumann  <werner.bau‐
526       mann@onlinhome.de>.
527
528
529       davfs2 is developed by Sung Kim <hunkim@gmail.com>.
530
531
532       Version  1.0.0  (and  later)  of davfs2 is a complete rewrite by Werner
533       Baumann.
534
535
536

DAVFS2 HOME

538       http://savannah.nongnu.org/projects/davfs2
539
540
541

SEE ALSO

543       umount.davfs(8), davfs2.conf(5), mount(8), umount(8), fstab(5)
544
545
546
547davfs2                            2020-08-03                    mount.davfs(8)
Impressum