Is transmission-daemon logging set-up properly?

25,485

I had the same issue on Ubuntu 16.04.

I finally understood that the daemon is launched via systemd.

Edit this file:

/lib/systemd/system/transmission-daemon.service

And put these options there:

ExecStart=/usr/bin/transmission-daemon -f --log-debug --logfile /var/log/transmission.log

Afterwards, run:

systemctl daemon-reload
systemctl restart transmission-daemon

And it should be working fine now.

Share:
25,485

Related videos on Youtube

Vlastimil Burián
Author by

Vlastimil Burián

I am passionate about Linux systems in general and POSIX shell scripting in particular.

Updated on September 18, 2022

Comments

  • Vlastimil Burián
    Vlastimil Burián almost 2 years

    I am having a question on GNU/Linux Debian 8.5 with transmission-daemon service.

    I fail to see if there is a problem with how I set-up its log file. Because the log file does't grow (actually there's nothing).

    First the manual:

    -e --logfile  
    

    Where to store transmission's log messages.

    --log-error  
    

    Show error messages

    --log-info  
    

    Show error and info messages

    --log-debug  
    

    Show error, info, and debug messages

    Now, I will tell you all changes I've made today step by step:

    I edited the default config file, cat /etc/default/transmission-daemon:

    # defaults for transmission-daemon
    # sourced by /etc/init.d/transmission-daemon
    
    # Change to 0 to disable daemon
    ENABLE_DAEMON=1
    
    # This directory stores some runtime information, like torrent files 
    # and links to the config file, which itself can be found in 
    # /etc/transmission-daemon/settings.json
    CONFIG_DIR="/var/lib/transmission-daemon/info" 
    
    # Default options for daemon, see transmission-daemon(1) for more options
    OPTIONS="--config-dir $CONFIG_DIR --logfile /raid5/transmission/transmission.log --log-debug"
    
    # (optional) extra options to start-stop-daemon
    #START_STOP_OPTIONS="--iosched idle --nicelevel 10"
    

    Is it a permission problem?

    ls -l /raid5/transmission/transmission.log
    -rwxrwx--- 1 debian-transmission debian-transmission 0 Aug  2 16:06 /raid5/transmission/transmission.log
    
    ls -ld /raid5/transmission/
    drwxrwx--- 3 debian-transmission debian-transmission 4096 Aug  2 16:06 /raid5/transmission/
    

    I added myself (vlastimil) to debian-transmission group, though I believe this allows me to access the data and has nothing to do with logging:

    sudo usermod -a -G debian-transmission vlastimil
    

    I changed the ownership of /raid5/transmission/, which, among other things, allows me to download new torrents:

    chown -R debian-transmission:debian-transmission /raid5/transmission/
    

    I granted all permissions, that could be needed:

    chmod 770 /raid5/transmission/
    

    While having stopped the service, I edited /etc/transmission-daemon/settings.json to have umask = 2:

    cat /etc/transmission-daemon/settings.json | grep umask
    
    "umask": 2,
    

    And of course I restarted service:

    service transmission-daemon restart
    

    Downloading and uploading works fine now, just the log is empty :/ Any clues?

  • Christophe De Troyer
    Christophe De Troyer about 6 years
    On my Ubuntu 16.04 this file is now located at /etc/systemd/system/multi-user.target.wants/transmission-dae‌​mon.service.
  • DustWolf
    DustWolf almost 6 years
    /var/log is not accessible by debian-transmission for writing, so create a folder with suitable permissions for Transmission to be able to create the log file.
  • Bachsau
    Bachsau almost 4 years
    One should not edit files in /lib odr /usr/lib. Systemd has a command for customizing unit files: systemctl edit --full transmission-daemon.service.