qBittorrent does not respect the umask set under the user that it runs as

Linux specific questions, problems.
Post Reply
link01

qBittorrent does not respect the umask set under the user that it runs as

Post by link01 »

I am trying to figure out how to set the umask for all downloaded files and directories using qbittorrent as umask 002. Currently all files being downloaded are being saved with a umask of 022. If I login under the username that qbittorrent runs as, I can create files in the same location where qbittorrent saves them with the correct file permissions (umask 002).
Why is qBittorrent not respecting the umask set under the users's ~/login_conf file ?
I have also tried to set the umask to 002 under sh config file and also tcsh (tcsh is the default shell for this qbittorrent dedicated user).

I am running qbittorrent-nox on FreeBSD 12.1. The files are saved to a local storage zfs pool, not on a remote storage.
scragly

Re: qBittorrent does not respect the umask set under the user that it runs as

Post by scragly »

It appears you got a solution in the discord, but for the sake of adding the info to the forum for easy viewing by others, the suggestion was to add something similar to the following to the Run external program on torrent completion option (found in Preferences > Downloads):

Code: Select all

chmod -R 775 %R
link01

Re: qBittorrent does not respect the umask set under the user that it runs as

Post by link01 »

This partially solves my problem and I am kind of a happy camper so far.
For instance, if I already have the torrent files and start a torrent to a different location and stop the torrent quickly, I would not be able to move the files in the new location of the torrent yet in order to seed the torrent, as the torrent did not finish the download and didn't run the chmod command.
I have tried to tinker with the umask setting under the user running qbittorrent to no avail. I will not touch the system wide setting for umask as that will mess up other services running here.
Are people seeing the same behaviour under a linux disto ?
link01

Re: qBittorrent does not respect the umask set under the user that it runs as

Post by link01 »

Also, once the files get moved to a different location, the files get overwritten with permission 775 for directory, 664 for files respectively. Thus as I stated above, the chmod partially fixes the issue. I would be very much interested to see if the same behavior is under a linux distro.
I suppose that fixing this might require more extensive knowledge on how a service works and why the umask set under that user that starts the service is not respected.
Post Reply