Second pi, permissions to Vero4k files

Hi All!

I’ve installed qbittorrent on a pi3 that I have laying around (Raspberry Pi OS). I followed this guide to do so: Running qBittorrent on the Raspberry Pi - Pi My Life Up
I have all my files mounted using autofs on all systems.

My intention was to replace the v4k transmission service with qbittorrent on a separate device. However, I’m getting permission errors trying to resume files using the qbittorrent setup. I tried created an osmc user/group on the pi, but that didn’t seem to help.

What do I need to do to make it so that all my systems play nice with my network drives?

Which media or shares (HDD, SSD, NAS) are connected to which device in what way?

Are you able to read and write to the torrent folder with the user the Pi 3 uses for qbittorrent?

Most torrent clients offer some kind of checking for existing files if you have the torrent chunks residing in a folder and then trying to add this torrent anew.

V4K has a USB HDD, mounted and shared out.
pi3 has no drive, and accesses the USB HDD via AutoFS as an NFS mount.

Yes, I can read and write to the folder correctly for all NEW torrents, but it can’t “check” existing torrents. It tries to download the torrent again, and just stalls at 0%.

I only have experience with Transmission which has this “rebuild/resume” kind of feature. Do you at least get the “Checking resume data” message like in this picture? Is the previously downloded data in the folder to which you can read/write?

No I do not. I think the problem is that the qbittorrent “user” doesn’t have access to the files, so it can do nothing with them (can’t even read them). Maybe I’ll try a chown command and see if that changes anything.

Try if sudo chmod -R 777 name-of-the-folder changes anything.

“changing permissions of ‘folder’ is not permitted”

Are you logged in to the Vero and its standard user osmc? I don’t get why you receive this error message.

Sorry, misunderstanding on my part. I was logged in and executed that command on the rpi3.

I’ll try via the vero. Interesting enough, when I perform an ls -l command on the vero most files/folders show up with OSMC:OSMC user group. This filder shows up as systemd-coredump 994

It is now performing the check of the file at the very least.

I think I might need to update the systemd file with UMASK=000 to open up permissions to anything trying to access the files.

Talking in the abstract will only get you so far. Can we have a bit of hard evidence, please?

What’s the output from runing id under user qbittorent?
When viewed from the RPi what are the permissions on the shared folder (or folders)?


Here is an example output of ls -l from user pi on the rpi3:

drwxr-xr-x  3 pi   pi          4096 Jan  4 10:56  FileFromV4KTransmission.mkv
-rw-rw-r--  1 osmc osmc   205877021 Feb 17 09:50  FileFromRpi3Qbittorrent.mkv

My linux knowledge is very lacking. The “user” I made for qbittorrent is osmc, but I don’t think I made it so it can log in as that user so I’m not sure how I can use the “id” command via that user.

This is what it looks like when I perform the same command on the v4k.

drwxr-xr-x  3 osmc             osmc        4096 Jan  4 10:56  Transmission
-rw-rw-r--  1 systemd-coredump  994   205877021 Feb 17 09:50  qBittorrent

Are you sure that your qbittorrent jobs run under user osmc. If so, you can simply run id osmc from user pi.

I’m sure of nothing. Here is my qbittorrent.service script:

Description=qBittorrent openpyn.service autofs.service

ExecStart=/usr/bin/qbittorrent-nox -d --webui-port=8080


So the Intention was to run it as that user. If I did it correctly is a totally different question…

ID Command yields:
uid=1000(pi) gid=1000(pi) groups=1000(pi),4(adm),20(dialout),24(cdrom),27(sudo),29(audio),44(video),46(plugdev),60(games),100(users),105(input),109(netdev),994(osmc),995(docker),997(gpio),998(i2c),999(spi)

id osmc yields:
uid=999(osmc) gid=994(osmc) groups=994(osmc)

I just recently altered that UMASK value too, it was 002 before I changed it a few minutes ago.

You need to do two things:

  1. Change the permissions on the shared folder to 775 (rwxrwxr-x). That needs to be done on the NFS server (V4K) side.

  2. On the Pi, run this command sudo usermod -a -G pi osmc (On RaspiOS, pi shares the same userid and groupid as user osmc does on OSMC, which is 1000:1000. NFS uses these numeric numbers to decide permissions)

That tracks with what @RJ45 was having me do. Is there a downside to using 777?

I think I ran the usermod command backwards earlier. osmc pi instead of the other way around.

it “feels” like the qbittorrent user is assigning the wrong permissions to the files and folders. Is that correct? Will my updated UMask (000) fix that?

777 is “anyone is allowed to do do anything”. It was to exclude permissions as source of the problem.

Keep with dill’s advice, he’s way more knowledgable on the matter than I am.

Looks like you did.

You can open up permissions to the world if you want but that’s the band-aid approach. 775 will give group write permission, which should be enough.