Yandex.Disk has banned the use of the open-source utility rclone

Background

Hello, Habr!

This post was prompted by a rather strange error that I encountered last night on my Linux laptop (yes, I'm one of those odd people who uses GNU/Linux on a laptop):

$ ls -l /mnt/yadisk
ls: reading directory '.': Input/output error
total 0

My first thought: the network is down, no big deal. But when trying to remount the directory, a new error occurred:

$ sudo umount /mnt/yadisk && rclone mount --timeout 30m ya:/ /mnt/yadisk
2020/02/21 20:54:26 ERROR : /: Dir.Stat error: [401 - UnauthorizedError] Unauthorized (Not authorized.)

That was already strange. Did the token expire? No worries, I'll reauthorize!

$ rclone config
... (I'll skip the entire terminal output) ..

After switching to the web and attempting to authorize there, I received a more specific message:

This application has been blocked for malicious activity, and access is denied (unauthorized_client).

My first thought: whaaaaat?

About rclone

A bit of background:
rclone — a well-known open-source utility for working with cloud storage (has been mentioned multiple times on Habr). The author calls it "rsync for cloud storage", which is quite succinct. But its functionality doesn't stop there: in addition to rsync features, it can also mount drives, function as the ncdu (which, by the way, allowed me to discover an incorrect calculation of free space on Yandex.Disk and successfully resolve the issue through support), and much more. The utility supports dozens of cloud storages, as well as more traditional protocols — WebDAV, FTP, rsync, and others. To access Yandex.Disk, the utility uses one, two, three the official public API of the Disk. The utility is truly unique and (in my opinion) belongs to that class of programs which you install once and receive constant benefit from.

Upon contacting Google, I immediately realized I wasn't alone. There is

What happened?

a bug in the official GitHub , as well as a discussion onSummary: the client_id of the utility has been blocked by Yandex.Disk, which is why authorization can no longer occur. You can try changing the client_id, but there's no guarantee that the same fate won't befall the new id. official forum.
Support response
is published on the same forum posted on the same forum:

The thing is, the Rclone program allows the use of Yandex.Disk as an infrastructure component, but Yandex.Disk is a personal service not designed for such tasks. Therefore, we do not support the combination of Rclone and Yandex.Disk.

"Infrastructure component"? Well, since it’s not allowed, I thought it might be detailed in the rules, but found nothing like that in the rules of the disk itself or its public API that I could find.

Alright, I'll write to support.
The first response I receive is exactly the same as what was posted above (about the "infrastructure component"). Okay, we’re not proud.

Further correspondence with support

Me:

Could you please let me know which service rule this violates?
I studied the terms of use for Yandex.Disk and found no prohibitions on using it "as an infrastructure component".

Moreover, I cannot use the utility from my personal laptop to work with the disk. This definitely does not fall under "infrastructure component" at all. The official disk client is terrible, sorry.

Support:

Sergey, the thing is, Yandex.Disk is primarily a personal service that is not designed for automatic backup uploads.
You can synchronize data between your computer and Yandex.Disk, as well as use the web interface of the Disk for uploading files and working with them.

If for some reason you are not satisfied with our program, please let us know. Traditionally, we listen to user feedback when releasing product updates.

You can review the documents governing the use of the service, specifically the "User Agreement for Yandex Services," published at https://yandex.ru/legal/rules/, as well as the "Terms of Use of the Yandex.Disk Service": https://yandex.ru/legal/disk_termsofuse

For tasks that require more power, we recommend using Yandex.Cloud. This is another cloud service from Yandex, designed for business tasks. You can learn more about Yandex.Cloud here: https://cloud.yandex.ru

Me:

You did not answer my question. Could you please let me know which rule of the service is violated by using rclone? I carefully studied the rules at your link (even before you sent it to me).

Recently, you wrote a post stating that Yandex actively supports OpenSource, and without OpenSource, there would be no modern internet.https://habr.com/ru/post/480090/).

Now, however, you are blocking an OpenSource utility for a fabricated reason.

By the way, the program does not perform "automatic backup uploads"; it is designed for working with cloud storage, including syncing data between a computer and Yandex.Disk. This is my main use case for the utility, which is now unavailable.

Support:

According to clause 3.1 of the "User Agreement", Yandex has the right to impose restrictions on the use of services for all users or for specific categories of users (depending on the user's location, the language in which the service is provided, etc.), including: the presence/absence of certain service features, the storage period for emails in Yandex.Mail, any other content, the maximum number of messages that can be sent or received by a registered user, the maximum size of an email or disk space, the maximum number of requests to the service within a specified period, the maximum storage period for content, special parameters for uploaded content, etc. Yandex may prohibit automated access to its services and stop accepting any information generated automatically (e.g., email spam).

The user is also warned about this in clause 4.6 of the "Terms of Use for Yandex.Disk".

Please note that the "Terms of Use for Yandex.Disk" also place an obligation on the user to act in good faith and refrain from abusing the service's functions. The user also undertakes to refrain from organizing mass file sharing using the service's functions.

Yandex has the right to enforce rules, limits, and restrictions aimed at preventing, limiting, and curbing mass file sharing as per clause 4.5 of these "Terms".

The latest response clarified things. Especially the first two paragraphs referencing paragraph 3.1 of the Yandex 'User Agreement' and paragraph 4.6 of the 'Yandex.Disk Terms of Use'. The text for 4.6 is not included here, so I will provide it:

4.6. Yandex reserves the right to establish any rules, limits, and restrictions (technical, legal, organizational, or otherwise) on the use of the Service and may change them at its discretion, without prior notice to the User. In cases where not prohibited by law, these rules, limits, and restrictions may vary for different categories of Users.

What are the conclusions?

Recently, the respected bobuk in his post here on Habr wrote that Yandex believes that:

We at Yandex believe that the modern internet is impossible without a culture of open source and people who invest their time in the development of open source software.

But in practice, it turns out quite the opposite. A great utility is blocked for something that is not prohibited by the service's rules. For allowing the use of the open public Yandex Disk API for its intended purpose — uploading files. It is blocked not for violating service rules, but simply because they can.
What is doubly strange is that specific rule violators are not blocked (it is also unclear which rules since using the disk for backups is not prohibited anywhere in the rules). The tool is blocked, and backup functionality is just one of many.

What an infrastructure component is and why they cannot be used with the disk is also unclear. Even a browser can be used as an 'infrastructure component'; should the use of the disk in a browser then be prohibited?

What to do?

For now, use your client_id and move on. But judging by the support response, one can expect a continuation of the witch hunt and blocking of other client_ids, user-agent rclone, or even some heuristic methods to block the utility.

P.S. I sincerely hope that this was just a simple mistake or misunderstanding. Yandex employs excellent specialists (many of whom I know personally), and among them, I am sure, are users of rclone.

Update 24.02.2020:
In in episode 690 of the Radio-T podcast, co-hosted by the respected Bobuk, the blocking of rclone was discussed. Start at 1:51:40.

Source: habr.com

Buy reliable website hosting with DDoS protection, VPS VDS servers 🔥 Buy reliable website hosting with DDoS protection, VPS VDS servers | ProHoster