1

This is the unit for the Transmission torrent client, which was compiled and installed from source.

/etc/systemd/system/transmission.service:

[Unit]
Description=Start the Transmission daemon
After=network.target

[Service]
Type=simple
User=_transmission
ExecStart=/usr/local/bin/transmission-daemon --foreground
UMask=0002

[Install]
WantedBy=multi-user.target

I need it to use umask 0002, but it still creates new files with the default 0022.

_transmission is a system user, but it has a home folder. All other options are default. It has no default group (gid "nogroup").

Things I've tried

  • systemctl daemon-reload
  • systemctl restart transmission.service
  • Reboot

System info

  • Hardware: Raspberry Pi 4B (arm64)
  • OS: Raspberry Pi OS (based on Debian bookworm)
  • systemd 252
1
  • Thanks, I will try that. I didn't think of looking in Transmission settings. Still, I wanted to understand why systemd can't change that. I suppose Transmission is overriding it internally. Found the documentation for the umask option in Transmission. Commented Dec 20, 2023 at 18:32

1 Answer 1

0

Well, it seems Transmission overrides the umask internally, so systemd cannot change it. Transmission lets you change the umask with a configuration option, which is documented here.

umask: String (default = "022") Sets Transmission's file mode creation mask. See the umask(2) manpage for more information.


I was also trying to do the same for the Syncthing process, and the systemd method works. It's even documented here. However, it only honors the umask if you set "ignore permissions" on the folders.

If you enabled the Ignore Permissions option in the Syncthing client’s folder settings, then you will also need to add the line UMask=0002 (or any other umask setting you like) in the [Service] section of the [email protected] file.

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .