Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Errored: Couldn't write to file. Access is denied. Torrent is currently in "upload only" mode. #18793

Closed
stemaDev opened this issue Apr 1, 2023 · 26 comments

Comments

@stemaDev
Copy link

stemaDev commented Apr 1, 2023

qBittorrent & operating system versions

qBittorrent: 4.5.2 x64
Operating system: Windows 10 Pro 21H2 (b. 19044.2728) x64
Qt: 5.15.8
libtorrent-rasterbar: 1.2.18.0

What is the problem?

I transerred my files from another client, it started checking them as they were already downloaded and for some of them it got to certain percentage and started downloading. Didn't think much of it as sometimes I skip some files which I didn't bother to do here. Then they nearly completed (70-99%), but it stopped there and errored with this message:
Errored: Couldn't write to file. Access is denied. Torrent is currently in "upload only" mode.
when I forced resume them, some of them with lower completion numbers got a few percentage but now I have around 10 torrent files that are around 97-99.9% and always give me this error.
Some of the files which successfully got to 100% still sometimes get this error and once I force resume they get back to a normal state.
I'm running qbittorrent with administrator rights, I double checked that administrators has access to that folder (which is silly but I didn't know what to do). I googled a lot and saw lot of people are having this but other than giving rights I saw no solution. utorrent never had this issue even though I was downloading to the same folders and running it without administrator rights.

Steps to reproduce

  1. bring in torrent file that was already downloaded
  2. point it to the folder where it was downloaded
  3. let it check the content
  4. 10% of the time it will say this "errored" message.

Additional context

image

Log(s) & preferences file(s)

log:
(W) 2023-03-23T08:53:55 - File error alert. Torrent: "Formula1.2022.R12.Francia.Verseny.HDTV.HUN.1080i.H.264-JVC". File: "E:\Videos\Series\Formula1\Formula1.2022.R12.Francia.Verseny.HDTV.HUN.1080i.H.264-JVC\Formula1.2022.R12.Francia.Verseny.HDTV.HUN.1080i.H.264-JVC.mkv". Reason: "Formula1.2022.R12.Francia.Verseny.HDTV.HUN.1080i.H.264-JVC file_open (E:\Videos\Series\Formula1\Formula1.2022.R12.Francia.Verseny.HDTV.HUN.1080i.H.264-JVC\Formula1.2022.R12.Francia.Verseny.HDTV.HUN.1080i.H.264-JVC.mkv) error: Access is denied"

@stalkerok
Copy link
Contributor

Are the folders in read-only mode?

@stemaDev
Copy link
Author

stemaDev commented Apr 1, 2023

No, and what backs up that it's not, it got to eg. 70% then errored, then 74, then errored, etc. Also utorrent didn't have an issue, also I ran the app as admin, also I gave every right to admins to that folder.
I also checked those files and folders with "unlocker" and it didn't find any locks.

@stalkerok
Copy link
Contributor

stalkerok commented Apr 1, 2023

@stemaDev, did you have the bt.read_only_on_complete option enabled in utorrent?

@stemaDev
Copy link
Author

stemaDev commented Apr 2, 2023

I've uninstalled it already, but I didn't set anything there apart from the download location and such.
One of the files went from 97.1% to 97.7% and errored again. I saw both !ut and !qB files also, deleted the !ut ones and tried to force it again to no avail.. Both "administrator" and "administrators" have all rights ticked. qb was able to create it's own files, it is able to download a bit, but then it stops. I was also thinking about caching somewhere but downloaded a few things since and my least space on a partition is 6gb.

@Nick4300
Copy link

Nick4300 commented Apr 4, 2023

I'm having similar issues. HAve v4.52 on windows 10 on an external drive. Suddenly many torrents saying in "upload only mode". Have only used new drive for torrenting, having brought torrents over from utorrent as it was having too many issues. I can force start the errored downloads, but errors out in less than a minute with minimal download. Started using Vuse for errored torrents with no issues and downloading to same drive. Don't want to have to use more than 1 client as it's easier to organize downloads in 1, but thinking of abandoning qbt if I cant resolve.

@glassez
Copy link
Member

glassez commented Apr 5, 2023

HAve v4.52 on windows 10

What variant exactly? At least it is important to know libtorrent version.

@Nick4300
Copy link

Nick4300 commented Apr 5, 2023

Variant?? Version 4.52 of qbitorrent.

@glassez
Copy link
Member

glassez commented Apr 5, 2023

Variant?? Version 4.52 of qbitorrent.

There are 4 variants of qBittorrent builds for Windows based on different combinations of Qt and libtorrent versions. So yes, what variant exactly do you talk about?

@Nick4300
Copy link

Nick4300 commented Apr 5, 2023

I hope this answers your question, not sure: QT-5.15.8 Libretorrent 1.2.18.0 Boost 1.81.0 Openssl-1.1.1t zlib1.2.13. Thanks.

@stalkerok
Copy link
Contributor

I already met this problem, and there was the fact that utorrent puts files / folders in read-only mode, so they cannot be updated (overwritten). Check well if the files / folders are not set to write restrictions.

@glassez
Copy link
Member

glassez commented Apr 6, 2023

HAve v4.52 on windows 10 on an external drive. Suddenly many torrents saying in "upload only mode".

Perhaps the problem is precisely that the external drive may have some short-term access failures during heavy use, which are interpreted as "access denied". At the same time, libtorrent has an excessively strict policy regarding such failures, so it immediately switches the torrent to "upload" mode. It's possible that other clients perform several write attempts, so such failures don't stop torrents there. I believe it would be better if libtorrent also had some similar mechanism. @arvidn?

@glassez
Copy link
Member

glassez commented Apr 6, 2023

@stemaDev
Do you also talk about external drive?

@stemaDev
Copy link
Author

stemaDev commented Apr 6, 2023

no, sata ssd

@stemaDev Do you also talk about external drive?

@glassez
Copy link
Member

glassez commented Apr 7, 2023

no, sata ssd

Is there a chance that disk has some kind of health problems? Or is it very full? Maybe you have some kind of "aggressive" antivirus that interferes with this?

@Nick4300
Copy link

Nick4300 commented Apr 7, 2023

Ok, so FINALLY resolved: I had checked read/write permissions on parent folder where torrents were being stored and verified that "read-only" was not selected. I also selected and then unselected "read-only" just to verify that everything within the folder was not blocked, even watched the window pop up going through all the files within parent directory verifying all were unblocked. Something told me to look at individual files that still appeared as "upload only" in the client, and lo and behold , they showed up as "read only" for some reason. So I went in and individually unchecked ' read-only" in over 100 files to FINALLY get them downloading again. Makes no sense. Hope this helps someone else. Thanks all.

@stemaDev
Copy link
Author

stemaDev commented Apr 7, 2023

The uncheck on the parent folder and applying to subfolders and files solved it for me as well. Thank You!

@stemaDev
Copy link
Author

stemaDev commented Apr 7, 2023

Are the folders in read-only mode?

They were, sorry. It just saw that there were write privileges and also that it could get to certain percentage. Alltogether this is strange, but at least it resolved it. Thank You!

@stalkerok
Copy link
Contributor

@glassez, i think the libtorrent label can be removed and the issue closed as resolved.

@glassez glassez removed the Libtorrent label Apr 8, 2023
@glassez
Copy link
Member

glassez commented Apr 8, 2023

@glassez, i think the libtorrent label can be removed and the issue closed as resolved.

Ok. Although I believe this comment is still relevant, even if not to this particular Issue, but to others related to "upload mode". Maybe @arvidn will answer it after all...

@glassez glassez closed this as completed Apr 8, 2023
@mjain234
Copy link

mjain234 commented Jun 2, 2023

How do you guys solve this problem? I just read out all the comments but didn't able to understand.

@patrioticsudip
Copy link

patrioticsudip commented Oct 2, 2023

Changing destination folder from C to some other drives might help.

@Pein1911
Copy link

Pein1911 commented Oct 9, 2023

@mjain234

How do you guys solve this problem? I just read out all the comments but didn't able to understand.

  1. Open file location.
  2. Right-click on a single or multiple files or the folder containing your files. (Using Windows File Explorer)
  3. Select the bottom context menu option "Properties".
  4. Remove check-mark from "Attributes: Read-only".
  5. Click on "Apply".

It will change back to read only mode right away

@NAKADZI
Copy link

NAKADZI commented Oct 14, 2023

@Pein1911

It will change back to read only mode right away

I have the same problem. After disabling the "Read-only" attribute and applying it, the properties window seems to show that the "Read-only" attribute is missing - but if you reopen the folder properties, the checkbox remains the same⤵️
Screen-743


@PriitUring

Then you have to read and try what's mentioned here:
https://www.makeuseof.com/windows-folders-read-only-mode/

Unfortunately, the methods provided in this article did not solve this problem.

I also tried various methods of removing this attribute through commands in the Terminal (CMD/PowerShell), which were carried out without any errors - but still, the attribute remained in place 😩

In addition, I moved the target folder from HDD to SSD - the result is still the same, the attribute is not removed under any circumstances.
I also booted into WinPE (which I have on a USB drive) and tried to remove the attribute there - to no avail 😢

Information about the target folder (if useful):
The folder contains the files of a game that has a total size of more than 160 GB.
I used to update these game files via qBittorrent in the same way, and I didn't have this problem.

I guess I'll have to go back to the proprietary "uTorrent". At the time of writing this comment, I have installed "uTorrent" and put the corresponding folder with the game on rehash - and the download process is now going on without errors. What will be the final result - I will write in the next comment, since the download speed is quite low.

@Ridyk95
Copy link

Ridyk95 commented Nov 12, 2023

For future reference in case anyone faces the same issue.

I have also encountered the very same issue after a Windows re-installation. According to what I have seen it is indeed the destination folder permissions. I have seen there were 2 entries on the folder permission by SID indicating those IDs are not existing in my refreshed system.

In short:
Go to properties-->Security and add group "Authenticated Users" with "modify" permissions which should fix the issue.

As an alternative creating a new folder and browsing that in the client as destination also does the trick as it includes all the required permissions for operation.

Folder permissions on a newly created windows folder:
SYSTEM - Full control
Administrators - Full control
Authenticated users - Modify
Users - Read

HTH,
Ridyk

@Pein1911
Copy link

It has something keep turn folder to read only mode even I quit qBittorrent, It happened sometime not every I run the qB

@nikitakuklev
Copy link

nikitakuklev commented Apr 7, 2024

Changing security properties did not help in my case - something still kept triggering the error (and re-setting read-only attributes).

What fixed it is moving folder out of user directory, as suggested on reddit. For example, from C:/Users/.../Downloads/Torrents -> C:/Torrents

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

11 participants