Qbittorrent won't download to mounted USB drive.

That would be too obvious

I switched the usb drive for the larger one and now qbittorrent doesn’t download again, although with different error. I followed the same procedure. Formatted the drive as ext4 and copied the files. Mounted it with drive_manager at /mnt/torrent. I can see the files at that location, but when I want to download the torrent to that location, qBittorent reports “Errored” as a status. I checked qBittorrent’s log and it says:

An I/O error occurred, … error: Permission denied

And this is results for ls -l

root@DietPi:/mnt# ls -l
total 20
drwxrwxr-x 6 dietpi dietpi 4096 Dec 3 20:19 dietpi_userdata
drwxrwxr-x 2 dietpi dietpi 4096 Sep 10 13:28 ftp_client
drwxrwxr-x 2 dietpi dietpi 4096 Sep 10 13:30 nfs_client
drwxrwxr-x 2 dietpi dietpi 4096 Sep 10 13:30 samba
drwx------ 13 dietpi dietpi 4096 Jan 16 17:50 torrent
root@DietPi:/mnt# cd torrent
root@DietPi:/mnt/torrent# ls -l
total 52
drwxrwxrwx 8 dietpi dietpi 4096 Jan 1 12:25 ubuntu.iso
drwxrwxrwx 8 dietpi dietpi 4096 Jan 1 15:15 ubuntu1.iso
drwxrwxrwx 2 dietpi dietpi 4096 Jan 1 12:18 ubuntu2.iso
drwxrwxrwx 2 dietpi dietpi 4096 Jan 1 15:01 ubuntu3.iso
drwxrwxrwx 8 dietpi dietpi 4096 Jan 1 14:43 ubuntu4.iso
drwxrwxrwx 2 dietpi dietpi 4096 Jan 1 12:21 ubuntu5.iso
drwxrwxrwx 2 dietpi dietpi 4096 Jan 1 14:54 ubuntu6.iso
drwxrwxrwx 10 dietpi dietpi 4096 Jan 1 15:56 ubuntu7.iso
drwxrwxrwx 2 dietpi dietpi 4096 Jan 1 14:48 ubuntu8.iso
drwx------ 2 root root 16384 Jan 16 16:10 lost+found
root@DietPi:/mnt/torrent#

qBittorrent is already the member of dietpi group. I also tried to restart its process as well as the whole RPi and did unmount/mount the usb drive again. Do you maybe know what the problem is?

at the moment torrent folder has permission for the user dietpi only. there is no permission for a group at all

drwx------ 13 dietpi dietpi 4096 Jan 16 17:50 torrent

You would need to allow group r/w access as well chmod 760 /mnt/torrent

Now it is:

drwxrw---- 13 dietpi dietpi 4096 Jan 16 17:50 torrent

but I’m still getting the same error. qBittorrent status “errored” and the same I/O error in the log. Is the problem those last four dashes before 13?

no because this would be everybody permission. you could try by doing chmod 777 /mnt/torrent. Usually something to be avoided as it will jeopardize security concept. And probably a reboot is needed to take effect for all processes.

I did a complete reboot after chmod 760 /mnt/torrent, but it still was showing the same error. It started working when I executed chmod 777 /mnt/torrent (thank you for that!), but now I’m not sure should I be concerned about jeopardizing the security concept as you said.

Once you download a file, can you share again ls -la /mnt/torrent. Let’s check how permission looks like for the new file

Sure, here it is:

drwxrwxr-x 2 qbittorrent dietpi 4096 Jan 17 13:46 kubuntu.iso

let’s check group membership of user qbittorrent

groups qbittorrent

root@DietPi:/mnt/torrent# groups qbittorrent
qbittorrent : dietpi

usually previous permissions should have been working. Let’s try to adjust as follow

chown -R qbittorrent:dietpi /mnt/torrent
chmod -R 775 /mnt/torrent
1 Like

Previously with 760 mode, execute permissions for the group were missing, required to allow reading a directories content, so 770 is the minimum when using dietpi:dietpi ownership. The qbittorrent user btw has dietpi as it’s major group, so that it creates files with this group as well, assuring R/W access for media applications that are members of the dietpi group as well.
That is the case with most download services, including Sonarr/Radarr/Lidarr, so all cases where often other daemons want to import those downloads.

Did a new/fresh install of dietpi wirh qBittorrent.
Installed and formated (EXT4) a new USB drive for downloads. Successfully mounted as /mnt/download

As expected qBittorrent not working. Log shows :
(N) 2021-04-02T13:19:06 - An I/O error occurred, ‘Album’ paused. Album.flac) error: Permission denied

dietpi@DietPi:/mnt$ cd download/
dietpi@DietPi:/mnt/download$ ls -la
total 2
drwxr-xr-x 3 root root  4096 Apr  2 13:16 .
drwxr-xr-x 7 root root  4096 Apr  2 13:17 ..
drwx------ 2 root root 16384 Apr  2 13:16 lost+found
dietpi@DietPi:/mnt/download$

would like to make a step by step to fix this permission problem (chmod, chown etc).
Any ideas ?

Please see and apply the two commands suggested by Joulinar above already :wink:: #p30557

Just did. bitTorrent now starts fine and download procceed.

however i’m having a weid situation. after a few minutes when try to look the folder … it returns this

dietpi@DietPi:/mnt/download$ ls -la
ls: reading directory '.': Input/output error
total 0
dietpi@DietPi:/mnt/download$

and then when I launch drive-manager … the mount shows it’s filesystem as “Filesystem: Net” and not Ext4 as before.

the USB drive still there (plugged in)

dietpi@DietPi:/mnt/download$ df -h
Filesystem      Size  Used Avail Use% Mounted on
udev            168M     0  168M   0% /dev
tmpfs            48M  4.4M   44M  10% /run
/dev/mmcblk0p1   15G  2.2G   13G  16% /
tmpfs           238M     0  238M   0% /dev/shm
tmpfs           5.0M     0  5.0M   0% /run/lock
tmpfs           238M     0  238M   0% /sys/fs/cgroup
tmpfs           1.0G     0  1.0G   0% /tmp
tmpfs            50M   32K   50M   1% /var/log
/dev/sda1       293G  4.6G  288G   2% /mnt/download
dietpi@DietPi:/mnt/download$

Can you check the health of the hard drive? I/O errors out of the blue are usually due to hardware failure.

The hard drive is ok. the problem was the dock station. Problem solved. Thank you.

I’m having the exact same problem. The drive starts out fine, but after using for a while qBittorrent stops downloading and drive manager reports the file system as ‘net’. What was the issue with the dock station? I’m using a 4TB drive with an USB 3.0 enclosure, and I’d love to know what you did to fix the problem. Both the drive and the dock are brand new.

I was using my dock with a wrong power supply. Not providing enough power.

Hm, okay. I’m pretty sure that I’m having another issue then, since I’m using the supplied power adaptor.