nzbget icon indicating copy to clipboard operation
nzbget copied to clipboard

umask setting is not respected

Open kaysond opened this issue 4 years ago • 3 comments

I have the nzbget umask set to 0002, and also set an env var used in https://github.com/linuxserver/docker-nzbget to 002.

For some reason all completed downloads are getting 640 permissions. I want them to get 664. Any ideas?

kaysond avatar Jan 29 '21 05:01 kaysond

Have you figured it out? Other than setting umask NZBGet doesn't do anything about permissions for downloaded or extracted files. Have you tried disabling option UMask in nzbget and setting umask before starting nzbget?

hugbug avatar Apr 24 '21 11:04 hugbug

It seems to have worked correctly on the one download I have in there right now... Let me check a couple more downloads

kaysond avatar Apr 24 '21 18:04 kaysond

In case anyone (@hugbug) sees this in the future - I think nzb file contents must support their own permissions, so the result just copies those perms. The nzbget umask just forces certain bits to be unset. What you really want is a post-processing script that sets the user/group/mode to whatever you want. I copied this one: https://gist.github.com/fryfrog/ee4a2a3a43a2a644e7c42e7f729664ca/ (note that you then have to set the options appropriately; it will add another category in the nzbget settings at the very bottom of the list)

kaysond avatar Oct 03 '22 20:10 kaysond