Client for managing yandex disk. Yandex Disk - connection via WebDAV protocol

To install the client automatically, use the package quick install command.

An example of a quick installation of a .deb package

echo \"deb http://repo..list.d/yandex-disk.list > /dev/null && wget http://repo..GPG -O- | sudo apt-key add - && sudo apt-get update && sudo apt-get install -y yandex-disk

To install the client manually, download desired version package at the corresponding link below.

Installation example using the dpkg package manager

# dpkg -i yandex-disk_0.1.0.103_i386.deb

Note. The repository is automatically installed at

Installation example using the rpm package manager

# rpm -ivh yandex-disk-0.1.0.103-1.fedora.i386.rpm

Note. The repository is automatically installed at /etc/yum.repos.d/yandex.repo

You can also add the yandex-disk package repository to the package manager's list of available repositories and install the package using apt-get or yum .

Installing with apt-get

Attention. Save a copy of the file /etc/apt/sources.list.d/yandex-disk.list before making changes to it.

# wget -O YANDEX-DISK-KEY.GPG http://repo..GPG\n# apt-key add YANDEX-DISK-KEY.GPG\n# echo \"deb http://repo..list.d /yandex-disk.list\n# apt-get update\n# apt-get install yandex-disk

Installation with yum

# nano /etc/yum.repos.d/yandex.repo\n# rpm --import http://repo..GPG\n# yum install yandex-disk

The contents of the yandex.repo file:

\nname=Yandex\nfailovermethod=priority\nbaseurl=http://repo...GPG

Initial Setup Wizard

You can perform initial client setup with the setup command.

$ yandex-disk setup

    Enter the name of the directory to store the local copy of Disk. If you leave the name empty, the Yandex.Disk folder will be created in the home directory.

    Specify whether to use a proxy server (y/n).

    Specify whether to launch the client at system startup (y/n).

    Enter your username on Yandex.

    Enter your Yandex password.

    Attention. If you are using or have used two-factor authentication, for authorization in the Yandex.Disk program, you need a one-time password generated by mobile application"Yandex.Key".

After the wizard completes, the configuration file config.cfg will be created in the ~/.config/yandex-disk directory.

Working with a client

Teams

The following commands are used to work with the client:

    token - get an authorization key (OAuth token) for your Yandex login (USERNAME ). When entering the command, you can specify your Yandex password ( PASSWORD ) and set the name of the file to store the token and the path to it ( FILE ). If Extra options are not specified, a passwd file will be created to store the token in the ~/.config/yandex-disk directory. $ yandex-disk token [-p, --password=PASSWORD] USERNAME

    start - start the daemon and synchronize all folders except those specified in the exclude-dirs exclusion list. $ yandex-disk start

    status - display the status of the daemon (sync status, sync errors, list of synced files, total and free disk space). $ yandex-disk status

    stop - stop the daemon. $ yandex-disk stop

    sync - synchronize all folders except those specified in the exclude-dirs list. $ yandex-disk sync

    publish - get a public link to the specified file or folder (FILE ). $ yandex-disk publish FILE

    unpublish - unpublish the specified file or folder (FILE ). $ yandex-disk unpublish FILE

Extra options

--config=FILE, -c FILE

Specify a configuration file. By default, the config.cfg file is used in the ~/.config/yandex-disk directory.

Dir=DIR, -d DIR

Specify the directory to store the local copy of Disk. If its name was not specified during the initial setup, the ~/Yandex.Disk directory will be used by default.

Auth=FILE, -a FILE

Specify a file with authorization data. The default file is passwd , which is created using the token command or the initial configuration wizard and stored in the ~/.config/yandex-disk directory.

Exclude-dirs=DIR1,DIR2,...

Do not synchronize the specified directories. For the setting to always take effect, the directories must be added to the exclude-dirs list in the config.cfg file. For the setting to work correctly, the names of excluded directories must be listed separated by commas, without spaces.

Read-only

Prevent changes to files on the Drive server and only sync on the local copy. If sync conflicts occur, local files will be renamed. If the --overwrite option is optionally specified, local files will be overwritten.

Overwrite

When synchronizing with the server, allow overwriting changes made in the local copy of Yandex.Disk. Used in conjunction with the --read-only option.

No-daemon, -D

Start the daemon without returning control to the console. To regain control, the daemon must be stopped by running the yandex-disk stop command in another console or by closing the current console.

Help, -h

Issue a certificate.

Proxy=PARAM

Set up a proxy server. Valid parameters:

    auto - use system settings proxy server (used by default);

    no - do not use a proxy server;

    protocol,address,port,login,password- set manually.

Command Usage Examples

$ yandex-disk start -c ~/ydconfig/newconfig.cfg # start the daemon and sync with specified file config \n$ yandex-disk start --exclude-dirs=Foto # don't synchronize Foto folder\n$ yandex-disk sync --read-only # synchronize folders in read-only mode\n$ yandex-disk publish Foto # get public link to the Foto folder

Example config.cfg file

# Path to a file with authorization data\nauth=\"/home/user/ydconfig/my_passwd\"\n\n# Directory for storing a local copy of the Disk.\ndir=\"/home/user/myDisk\"\n\ n# Do not synchronize the specified directories.\n#exclude-dirs=\"exclude/dir1,exclude/dir2,path/to/another/exclude/dir\"\n\n# Specify a proxy server. Examples:\n#proxy=https,127.0.0.1,80\n#proxy=https,127.0.0.1,80,login,password\n#proxy=https,127.0.0.1,443\n#proxy=socks4,my .proxy.local,1080,login,password\n#proxy=socks5,my.another.proxy.local,1081\n#proxy=auto\n#proxy=no

Questions and answers

What Drive features are available in the console client?

When working with the console client, you have access to all the main features of the Disk: synchronization and publication of files and folders, selective sync folders.

Does selective folder sync work in the console client?

Yes. You can disable sync individual folders, specifying them when entering the command (parameter --exclude-dirs=DIR1,DIR2,... ) or adding exclude-dirs to the list of exclusions in the config.cfg file.

Does the console client support symbolic links?

Yes, it does.

Can I use the console client to replicate data?

Yes. Data replication can be implemented using the --read-only option.

GUI for Linux console client

You can work with the console client using third party GUIs.

Name Description
YD-tools The utility supports all the main functions of the console client. It displays the current sync status as an icon in the system tray and can report changes via toast notifications. It also adds items responsible for publishing to the context menu.

In this article, we will make Yandex c Linux related, or rather, connect Yandex disk to Linux as a local folder. We implement access to Yandex disk from Linux using the WebDAV protocol, everything is done quite simply.

Access to Yandex disk in Linux can be implemented in several ways.

  1. The first way to connect to Yandex disk.

Can be done using the standard file manager used in Linux distribution, be it Dolphin (KDE), Nautilus (Unity or Gnome), Nemo (Cinnamon), Caja (Mate), Thunar (Xfce) or PCManFM (LXDE), in short, all those that support WebDAV technology.

For this it is necessary in address bar file manager from the view of icons (buttons) switch to the view of a text line so that you can write the following address:

davs:// [email protected]/

Where user must be replaced with your Yandex login and click , after which you must enter a password. Here you can make a choice in the dialog box, when entering a password, indicating "remember forever". After connecting Yandex disk to the Linux file manager, you can bookmark , after restarting the system, you will have a bookmark for mounting Yandex clouds.

  1. The second way to connect a Yandex disk in Linux is the davfs2 utility, which can be found in every distribution.

To install davfs2 on Ubuntu, the command would be:

sudo apt-get install davfs2

Setting up davfs2 to mount a Yandex disk in Linux

We create a directory in Linux where Yandex disk will be mounted. I suggest creating it in the /media directory:

Sudo mkdir /media/yandex_disk

With the next command, we mount the disk to the created directory by entering our login and password from Yandex account, and grant rights to our user:

sudo mount -t davfs https://webdav.yandex.ru /media/yandex_disk && sudo chown -R pavel /media/yandex_disk

(instead of pavel we write the name of our user)

Check disk connection:

Sudo echo "https://webdav.yandex.ru username password" >> /etc/davfs2/secrets

(username password - you must enter your own).

The login and password for connecting to Yandex disk can always be changed in the /etc/davfs2/secrets file with your favorite text file editor.

And finally, we finish setting up Yandex disk, automatic connection it after system start. To do this, add the following to the end of the /etc/fstab file:

https://webdav.yandex.ru:443 /media/yandex_disk davfs user,noauto 0 0

Now you can add your user to the group: davfs2

Sudo adduser pavel davfs2

(pavel to change to his own).

Well, in the end, we change the rights to the mount.davfs file with the following command:

sudo chmod 4755 /usr/sbin/mount.davfs

After a reboot, a mount point should appear in the file manager.

  1. The third way is not quite Linux, but something in the style of Windows.

Why do I treat him like this? Because this package is not from the repository, which means that the entire responsibility for the security of the system when installing packages from non-Linux repositories lies on your conscience. Your system keeps track of updating these packages, it will not be able to, which means that these software packages will remain in this state from the moment of installation.

However, it will be easier for someone to set up access, so all manipulations are minimal, click on the package and go.

Yandex Disk cloud storage can be connected to your computer as a network drive using the WebDAV protocol. After connecting a network drive, you will be able to work with Yandex cloud storage from your computer, just like with a regular drive in the operating system. Windows system.

In Yandex.Disk, you can store your files in the "cloud" by interacting with the storage using special program-client, or managing your data through a web interface using a browser for this.

When using a special program from Yandex, your files will be stored simultaneously on your computer and in the cloud storage, and when using the web interface, your data will be stored only in the cloud storage.

You can also use Yandex.Disk as a network drive. This will allow you to access your cloud storage files directly in File Explorer. The Drive will be connected to the computer using the WebDAV protocol.

Network Drive by WebDAV

WebDAV (Web-based Distributed Authoring and Versioning) - translates something like this: web tools for distributed development and version control. It is a set of extensions that are installed over the HTTP protocol that allow users to co-author and manage files on a remote web server.

After connecting Yandex.Disk as a network drive to your computer, you will get access to all the contents of the cloud storage in this account. In this case, Yandex.Disk connected via WebDAV will be available only when an Internet connection is connected. If Internet access is disabled, then in this case, access to the network drive will be terminated.

Another feature of using Yandex.Disk via the WebDAV protocol is that all data from this cloud storage will be located in the "cloud" and not on your computer. You work with cloud storage like a regular disk on your computer, while all data will be physically located on a remote Yandex server.

If a client program is already installed on your computer and you use cloud storage on your computer, then when connecting Yandex.Disk via WebDAV, you can additionally connect a network drive with your other Yandex cloud storage to your computer.

You can have several cloud storages in Yandex. This is a fairly common occurrence, since many users may have several email accounts in Yandex. Yandex.Disk is linked to an electronic mailbox, so these users will automatically have several cloud storages that they can use.

How to connect Yandex.Disk as a network drive to a Windows computer

To map a network drive to operating system Windows, you will first need to right-click on the "Computer" or "This PC" icon on the desktop or from the Start menu. Then you will need to select the context menu item "Connect a network drive ...".

In another way, it will be possible to connect a network drive from the Explorer window, open in the "Computer" tab. There you will need to select "Map network drive".

Next, the "Map network drive" window will open. In this window, you must select a letter for the new network drive. By default, Windows automatically selects a free letter of the alphabet. You can change the drive letter if you need to.

In the "Folder" field, you will need to enter the following address:

https://webdav.yandex.ru

By default, the "Restore at login" option is enabled.

After completing the selection of settings, click on the "Finish" button.

After successfully connecting the network drive, the "Windows Security" window will open.

Here, in the "User" field, you will need to enter the login from your account in Yandex.Disk. Since the login is tied to a mailbox in Yandex, please note that in this case, you will need to enter an incomplete address Email, but only the login (what comes before "dog").

In the "Password" field, enter the password for your account. Then, activate the "Remember credentials" item in order not to re-enter your data every time you connect to a network drive. Next, click on the "OK" button.

After that, the Explorer window will open cloud storage Yandex.Disk. All files and folders that are located in this particular cloud storage will be displayed here.

In the Explorer window, all network drives connected to your computer will be displayed in the "Network Locations" area.

Now you can use the Yandex cloud like a regular disk on your computer.

How to disable Yandex WebDAV network drive

To disconnect the webdav yandex disk from the computer, you will first need to click on the "Computer" or "This PC" icon, and then in context menu Select "Disable Network Drive...".

In the Network Drives window that opens, you will need to select desired disk, and then click on the "OK" button.

After that, the Yandex.Disk network drive will be disconnected from your computer.

Article Conclusions

The user can connect the Yandex.Disk cloud storage to his computer as a network drive using the WebDAV protocol. In this case, you will use the remote "cloud" as a network drive. At the same time, your files will be physically located on a remote server, and you will be able to work with them both on regular disk your computer.

Experienced PC and Internet user

The Yandex Disk app offers 10 GB of free space after installation. Subsequent gigabytes are purchased separately. According to the tariffs for 10 GB, the developer asks for 30 rubles, 100 GB - 80 rubles, 1TB - 200 rubles. Prices include 30 days rental.

The application installed for Windows, Mac OS X or mobile platforms will require a constant Internet connection to synchronize files. When the network is off, downloading new data will happen automatically after connection. It is difficult to feel the influence of disk operation. On Android and IOS automatic synchronization configured by the user. The option of working only when available will save expensive mobile traffic.

The Yandex storage manages information on the server by changing files in the program folder on the user's computer. Unfortunately, this option may not suit you due to the unwillingness or inability to store files on the HDD (), arising from lack of space or using an incompatible OS.

Connecting and configuring WebDAV on Windows

If you want to use Yandex storage on Windows OS without having to map a network drive. The sequence of actions in this case is as follows:

    1. Right-click on the computer shortcut, on the desktop or in the Start menu.
    2. In the list that opens, select "Map network drive".

    1. In the window that appears, specify the drive letter and address of the Yandex NAS server https://webdav.yandex.ru/.

    1. Click the "Finish" button and wait for the network drive to be connected.
    2. After a short wait, a window will open automatically. Windows Security, in which you will need to enter the data of your account with the linked Yandex storage in the appropriate fields.

Access to the menu for connecting a network drive is also present in Explorer - an item in the tab of the upper horizontal menu "computer". Having correctly completed the sequence of actions, a new network drive with files will appear. Unlinking the Yandex catalog is done through the "Disable Network Drive" menu.

Connecting a file service through the Windows command line

If the option to mount a network drive using Windows Explorer does not suit or does not work correctly, there is a second solution to the problem using the command line (CMD). First you need to run it. There are two options for how to do this:

    1. Dial search query"cmd" in the start menu (if installed Windows Vista, 7 cm), after which windows will show the icon of the application that needs to be launched.
    2. For Windows 8, 8.1 and 10, launch the “Run” application, which is provided in all versions of the OS from Microsoft, using the “Win ​​+ R” key combination and enter the “cmd” command in the window that opens.

At the stage when command line is already running, you will need to perform several actions in turn:

    1. Type command " Net use", sequentially writing the letter of the volume, the address to network folder Yandex and the parameter for restoring the storage after a reboot (if restoration is needed - yes, otherwise - no, respectively). The completed command looks like this: net use j: https://webdav.yandex.ru /persistent:yes».

    1. Confirm the command with the Enter key.
    2. After that, the console will prompt you to enter a username, which you will need to do.
    3. At the end, enter the password, not forgetting to confirm the entry.

The network drive will now appear in File Explorer. If access was denied, the password and username must be checked.

Particular attention should be paid to step number 4, since the introduction of secret characters in cmd is not displayed even as asterisks.

WebDAV network drive on Linux to access Yandex drive

In order to map a network drive on Linux, you need to follow four steps:

  1. Open file manager Nautilius (standard tool for Linux OS).
  2. Left-click on the "Connect" menu, after which a window with connection settings will open.
  3. In the server field, enter the address https://webdav.yandex.ru, set port 443, select the type " Secure WebDAV”, leave the folder item unchanged, fill in the username and password with Yandex registration data.
  4. After clicking on the connect button in Nautilius, a network drive with files will appear.

Connecting a console client on Linux

The second method for Linux offers faster online storage access and lower hardware load than WebDAV.

One minus - the package is installed without GUI. Commands for setting up and working with files are executed through the terminal.


The setup comes down to three steps:
  1. Download the official console client package and install or execute the process through the console command detailed on official page downloads.
  2. Confirm the setting with the Enter key.
  3. Log in with the username console command and enter your login and password in the terminal.

A detailed list of commands for working with the client in Linux is presented on the application download page. This method is suitable for users who confidently control the terminal.

Yandex Disk API

API (Application Programming Interface) is a shell used for programming applications. With this Yandex software third party developers embed online storage functionality into their own programs. The kit is distributed free of charge on the official website with the tech subdomain.
In addition to compatibility with Windows applications, Mac OS X, mobile platforms are supported. Windows phone, IOS and Android.

For web programmers, Yandex presented packages that, using widgets, easily integrate storage into the site.

The API is implemented on the open WebDAV protocol, which is based on HTTP (Hypertext Transfer Protocol). The program allows you to instantly upload a file to the server if it has already been synchronized by the user of the service. The functionality works on the principle of reconciliation checksums. When they match, an instant download occurs. The function is called "Deduplication".

In addition to the API, for the convenience of developers, the disk programmers also released a full-fledged Yandex SDK package available in Java, as well as the object-oriented programming languages ​​C Sharp and Objective-C.

Download master and Yandex disk

Such a simple process as downloading a file with an external loader does not raise any questions. But in practice, there is a problem with the Yandex storage. When studying the download page on Yandex disk, you may encounter a dilemma - the copy link you need Download Master, No. In order to get it you need:

    1. Start downloading in browser (see ).
    2. Go to download tab.
    3. Pause to save traffic or immediately right-click on the downloaded object.
    4. Select "copy link address".

  1. Add a new download to Download Master using the copied link.

Capturing Download master links

There is another solution to the problem if the option described above does not suit you. Download Master in this case is configured to intercept downloads. For this you will need:

  1. Run the program.
  2. Go to "Settings" in the horizontal menu.
  3. By pressing the plus, open the "General" topic and select the "Integration" sub-item.
  4. Check the boxes: "Track URLs in the clipboard", "Integration in Microsoft Internet Explorer", "Advanced Integration".
  5. Restart browser.

Interception is only supported in Internet Explorer. For correct operation version 6+ is required.

Downloading private files

If the file has no settings public access, then the link to it is available only to the owner. To find the URL for a personal document:

    1. You need to log into your Yandex disk account through a browser.
    2. Select the file with the left mouse button, after which a thumbnail and description will appear in the right column.
    3. Click on the download icon located to the right of the yellow "Edit" button.

Set up download manager:

    • on the "Tools" tab - select "Site Manager";

    • in the window that opens, select "Add";

    • fill in all the fields, "Site" - specify https://passport.yandex.ru and your login/password for Yandex services.

With flexible connection options for different systems Yandex online storage will become a convenient application for corporations and users who want to get high-speed access to files from anywhere in the world, as well as free space, which is enough for personal documentation and photos.
Another popular app from Yandex - thanks to which the user receives the latest information on flights of airplanes, intercity and suburban trains, ferries and buses