0

I have transmission daemon 2.94 running as a service on a Debian 10 machine.

I changed the user running transmission daemon from default debian-transmission to www-data Apache user, since I want the save files to be readable by Apache and the opposite, Apache files to be readable by transmission.

To do that, I changed to the user setting from the following config files:

  • User=www-data in /lib/systemd/system/transmission-daemon.service
  • USER=www-data in /etc/init.d/transmission-daemon
  • setuid www-data and setgid www-data in /etc/init/transmission-daemon.conf

The transmission JSON config file still resides in /etc/transmission-daemon/settings.json. I made sure both directories /var/lib/transmission-daemon and /etc/transmission-daemon were owned by the new user www-data.

But when I relaunch the service with sudo systemctl start transmission-daemon or sudo service transmission-daemon start, I get the following in the transmission logs:

Couldn't create "/var/www/.config": Permission denied (file-posix.c:189)
Couldn't read "/var/www/.config/transmission-daemon/settings.json": No such file or directory (utils.c:238)
Couldn't save temporary file "/var/www/.config/transmission-daemon/settings.json.tmp.jq3qtN": No such file or directory (variant.c:1285)

...and other similar errors.

So it would seem transmission-daemon is trying to use the www-data user home path and recreate its config directory here.

Why is that and how can I make transmission using the previous default config path? I don't see any transmission configuration depending on the user home path.

Side question: what is the difference between all those three config files where you set up the user running the service?

1

Transmission-Daemon saves it's config to the home folder of the user it is running on. In the default case for user transmissio-daemon the home folder is

/var/lib/transmission-daemon as it is defined in /etc/passwd

In Debian, the settings.json file found in /var/lib/transmission-daemon/.config/transmission-daemon/ is just a symlink that points to /etc/transmission-daemon/settings.json

Being a home folder is it supposed to be able to write in there. The errors you receive are because transmission cannot write it's settings/stats in the home folder of the user it is running on.

However, i think the best approach to this is to use umask in settings.json to give access to others to files created by transmission and setup the download folder to a location that is reachable by you web-server (maybe a folder in /var/www with permissions to write in for transmission)

If you give more details regarding your use case maybe we can create a configuration that suits your needs without changing the user for transmission.

| improve this answer | |
  • Thanks. I think you're thinking about debian-transmission user, not transmissio-daemon, even though the home folder path is very confusing. Anyway, I need the downloaded files to be saved in a specific folder that I have set in settings.json, and which is accessible to Apache user, and this folder is neither in /var/www (and must not be), neither in debian-transmission home folder. Regarding the errors, then should I move the /var/lib/transmission/.config to the Apache user folder maybe (with the appropriate change of rights of course)? – bolino Nov 24 at 9:38
  • Regarding my side question, it's not about settings.com and its symlink (I get that), but about the difference of the user setting between /etc/init.d/transmission-daemon, /lib/systemd/system/transmission-daemon.service and /etc/init/transmission-daemon.conf. It's quite confusing. – bolino Nov 24 at 9:38
  • Anyway, I just moved the .config folder to /var/www/ Apache user home folder, with the appropriate rights, and everything works now. – bolino Nov 24 at 10:35

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.