-
-
Notifications
You must be signed in to change notification settings - Fork 15.3k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
transmission: Configurable download directory permissions #70542
Conversation
Hmm, this probably merits some discussion. I had a similar problem as you. In my case I wanted to make sure that both the If there's a need for different permissions on different machines, perhaps they should be configurable? |
Good points. Indeed, 700 should be enough. I also agree that making the permissions for download-dir and incomplete-dir configurable would be better. I'll have another go at this and update the PR later. |
f9f4a63
to
8694886
Compare
I've reworked this to add a new option downloadDirPermissions which gets applied to download-dir and incomplete-dir. It defaults to 770 like the old code. I think that's a bad default, but I'd also like to avoid a package update changing people's torrent directory permissions. I'd like to hear others thoughts on this. This patch also makes homeDir and settingsDir 700 (non-configurable). I don't expect this will affect anyone. |
Allow the user to specify the permissions to apply to download folders used by transmission. This is useful e.g. when they are stored on a network share and accessed by other users. This commit also makes the home and config directories 700, as there is should be no need for wider permissions there.
8694886
to
58c0a05
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM, I have similiar issues currently with my transmission setup
fyi, this change made the transmission service unusable with default settings.
I have to also echo #55161 - why do the directories get their permissions set on every load of the service? |
hmm, this is indeed not very practical, I will have to fix that, thanks for pointing that out. I guess we could add a check if the directory already exists and chmod it only then or do it in an activationScript. |
@bb2020 ah, this looks good, is there a PR open for that? |
The ExecStartPre script previously ran a 'chmod 770' on all directories,
including complete and incomplete download directories. Change this
so it only ensures user and group rights, but don't touch world
permissions.
Motivation for this change
I would like to access my torrent complete folder (stored on NFS) from other sources. I have correct permissions set there, but on every start of the transmission service it resets the permissions to 770.
See also issue #55161
Things done
sandbox
innix.conf
on non-NixOS)nix-shell -p nix-review --run "nix-review wip"
./result/bin/
)nix path-info -S
before and after)Notify maintainers
cc @astsmtl @vcunat @wizeman