Opened 11 years ago

Closed 11 years ago

#3709 closed Bug (worksforme)

Error message about transmission log file

Reported by: tepelstreeltje Owned by:
Priority: Normal Milestone: None Set
Component: Daemon Version: 2.03
Severity: Normal Keywords: needinfo
Cc:

Description

I changed the log file for the transmission-daemon through /etc/default/transmission-daemon as shown below

OPTIONS="--config-dir $CONFIG_DIR -e /var/log/transmission/transmission-daemon.log"

ll of /var/log showing : drwxrwxr-x 2 root adm 4096 Nov 2 17:32 transmission

and inside the transmission directory : -rw-r----- 1 root adm 5890 Nov 2 17:38 transmission-daemon.log

But when I start the transmission daemon :

sudo /etc/init.d/transmission-daemon start Starting bittorrent daemon: transmission-daemonCouldn't open "/var/log/transmission/transmission-daemon.log": Permission denied.

But the daemon is saving all logs in the file anyway.

Change History (3)

comment:1 Changed 11 years ago by tepelstreeltje

After setting log group ownership and write permissions to debian-transmission and group writable the error goes away. I'm still a bit confused as to how it was able to write to the file at the start without the correct group permissions.

comment:2 Changed 11 years ago by charles

  • Keywords needinfo added

Well first off, I'm surprised you're running Transmission as root... I don't know of any security holes in Transmission, but in general one wants to minimize the number of apps running with root permissions.

That said... what you're describing here looks like it ought to work.

The error message comes from this part of the code of daemon.c:

case 'e': logfile = fopen( optarg, "a+" );
          if( logfile == NULL )
              fprintf( stderr, "Couldn't open \"%s\": %s\n", optarg, tr_strerror( errno ) );

...which is about as straightforward a piece of code as you're likely to get.

I don't see how Transmission could have written to the file without permissions either, especially when fopen() failed. Maybe you were mistaken?

comment:3 Changed 11 years ago by livings124

  • Resolution set to worksforme
  • Status changed from new to closed

Please reopen with more information.

Note: See TracTickets for help on using tickets.