We mount WebDAV in CentOS 7 using Yandex.Disk as an example

We mount WebDAV in CentOS 7 using Yandex.Disk as an example

WebDAV (Web Distributed Authoring and Versioning), or simply DAV, is a set of extensions and add-ons to the HTTP protocol that support users to collaborate on file editing and file management on remote web servers. The mission of the working group on the creation of DAV was stated: “development of additions to the HTTP protocol, allowing the free interaction of tools for distributed web page development, in accordance with the needs of users.” However, in the course of operation, DAV found itself a number of other uses that went beyond the originally accepted framework of collective work on web documents. Today, DAV is used as a network file system that is efficient for the Internet and is capable of handling entire files, maintaining good performance in high latency environments.

We update the operating system, add the EPEL repository and install davfs

[[email protected]]# yum update
[[email protected]]# yum install epel-release
[[email protected]]# yum install davfs2

Adding data for authorization in Yandex.Disk

[[email protected]]# nano /etc/davfs2/secrets
# Examples
# /home/otto/foo                otto          g3H"x 7z\
# /media/dav/bar                otto          geheim
# Old style
# "http://foo.bar/my documents" otto          "geh # heim"
# https://foo.bar:333/dav       otto          geh # heim
https://webdav.yandex.ru        %user%        %password%


[[email protected]]# mkdir /mnt/yandex
[[email protected]]# mount -t davfs https://webdav.yandex.ru /mnt/yandex
/sbin/mount.davfs: Warning: can't write entry into mtab, but will mount the file system anyway