Dataset permissions - qbittorrent

michalrentka

Cadet
Joined
Jul 20, 2022
Messages
7
I have a little problem with qbittorrent. When it downloads a torrent, it creates a folder in "Downloads" data set, but this folder is not editable by my user. I access the folder via SMB share. I have a group "media_sharing" where my local user is assigned. The "Downloads" data set is setup with NFSv4 ACL. Permissions are set to preset NFS4_HOME:

Screen Shot 2022-08-12 at 19.53.03.png

qbittorrent owner/group id is 568 which is "apps". I tried adding the "apps" user to my "media_sharing" group or adding my user to "apps" group, but neither worked. I can edit the new folder when I re-apply ACL permissions with "Apply permissions recursively". So how do I make qbittorrent inherit proper permissions for newly created folders?
 

homer27081990

Patron
Joined
Aug 9, 2022
Messages
321
Middlewared needs reloading after a known user changes groups out of the blue. Changing group and changing an ACL (witch is a filesystem entity) are a lot different processes.
 

homer27081990

Patron
Joined
Aug 9, 2022
Messages
321
Maybe you have setup a full inheritance chain in your datasets, all the way from the Pool? First ancestor takes precedence, so maybe set the first dataset to "no inherit" and go from there?
 

indivision

Guru
Joined
Jan 4, 2013
Messages
806
So how do I make qbittorrent inherit proper permissions for newly created folders?

I ran into something similar with this app. I solved it by using an in-app setting.

Within qBittorrent, go to: Options > Downloads

Scroll all the way down and check "Run external program on torrent completion"

Then add a line like:

chmod -R 774 "%D"

Save. See if it works.

If that doesn't work, try using the permission settings in the app settings instead of ACL. ie. Make a group called media, then put that groups GUID number in the "fsGroup" field in the TrueNAS application settings for qBittorrent.
 

michalrentka

Cadet
Joined
Jul 20, 2022
Messages
7
Maybe you have setup a full inheritance chain in your datasets, all the way from the Pool? First ancestor takes precedence, so maybe set the first dataset to "no inherit" and go from there?
Unfortunately that didn't help too, looks like this is a specific issue for qbittorrent. It works when I set the chmod manually from the app as indivision mentioned.

I ran into something similar with this app. I solved it by using an in-app setting.

Within qBittorrent, go to: Options > Downloads

Scroll all the way down and check "Run external program on torrent completion"

Then add a line like:



Save. See if it works.

If that doesn't work, try using the permission settings in the app settings instead of ACL. ie. Make a group called media, then put that groups GUID number in the "fsGroup" field in the TrueNAS application settings for qBittorrent.
This works! Thanks. I completely missed there is this option too.
 

jjairpants

Cadet
Joined
Nov 17, 2022
Messages
2
Thought i would add my 2 cents in here because it seems to be a fairly common issue and it really seems to be narrowed down to qbitorrent. I was having the same issues. it would download the files just fine and plex seemed to not care either but if i were to browse the directories it would not let me do so because of permissions errors. What i wound up doing was going into the qbitorrent app in truenas, edit the settings and change the user ID. it was set to the apps user and apparently it was setting all the permissions to everything it downloaded to that user and I couldn't access it. I changed the user ID to mine, which happened to be 1000 and after that it straightened up. so essentially it starting dropping the files in the download folder as me. plex still behaved just fine. but now i can open them and delete them if i need to. or rename them. Hope it helps. It seems it's only an issue on the truenas app as I have the client running on another server running under the local user and it has zero issues.
 

aednichols

Dabbler
Joined
Oct 1, 2022
Messages
11
Thought i would add my 2 cents in here because it seems to be a fairly common issue and it really seems to be narrowed down to qbitorrent. I was having the same issues. it would download the files just fine and plex seemed to not care either but if i were to browse the directories it would not let me do so because of permissions errors. What i wound up doing was going into the qbitorrent app in truenas, edit the settings and change the user ID. it was set to the apps user and apparently it was setting all the permissions to everything it downloaded to that user and I couldn't access it. I changed the user ID to mine, which happened to be 1000 and after that it straightened up. so essentially it starting dropping the files in the download folder as me. plex still behaved just fine. but now i can open them and delete them if i need to. or rename them. Hope it helps. It seems it's only an issue on the truenas app as I have the client running on another server running under the local user and it has zero issues.
Thanks, that worked for me. I had completely glossed over the "run as" field as a way to remedy app permissions.
 
Top