qBitTorrent default permissions set to downloaded files

Hi all,

I’ve set up qbittorrent and samba, added USB external disk, set it as a share in smb.conf and am able to use it by Windows PC (logged in as dietpi user)

Now, whatever qbittorrent downloads, I have read and write access (as dietpi and qbittorrent user are part of the same dietpi group) but no execute permission (useful if I want to run downloaded file to install an app for example)

To remedy it, I need to chown that folder and files to permission 2775 manually every time after I download something, which is frustrating.
Also, I tried to set UMask to 000 (default setting 002) in /etc/systemd/system/qbittorrent.service, restarted qbittorrent service and downloaded something to test - but it was the same result - files had no execute permission.


As I couldn’t find any option to make all new downloaded files executable by default, decided to ask it here - please help!



Samba share settings (as in smb.conf), if needed:

[wdextdsk320gb]
        comment = External Disk 320GB
        path = /mnt/wdextdsk320gb
        browseable = yes
        create mask = 2774
        directory mask = 2775
        valid users = @dietpi
        writeable = yes
max connections = 16

Thid was already issued at github
https://github.com/qbittorrent/qBittorrent/issues/8016
and there are also some solutions suggested.

( Run external program on torrent completion | chmod -R 770 “%F/”)

Thanks Jappe for a tip - I followed your suggestion and added chmod -R 2775 “%F/” command to run after torrents get downloaded. It’s a hack but it works, so… :wink:

One thing I started to notice that, for some reason, qbittorrent gets stuck and I need to manually restart the service to get it to work again.
I noticed it while adding a new torrent that it would stuck at “downloading metadata” or just “downloading” at 0.0%.
If I restart the service and refresh the web interface - it starts to download as intended.

Currently have no idea why it gets stuck. It was not a case before…