mumble-voip / mumble

Mumble is an open-source, low-latency, high quality voice chat software.
https://www.mumble.info
Other
6.42k stars 1.12k forks source link

murmur won't write to assigned log file #5955

Closed atomGit closed 2 years ago

atomGit commented 2 years ago

The issue

everything seems to be working fine except murmur won't log to the log file

Manjaro ARM headless murmur 1.4.287

pidfile=/var/run/murmur/murmur.pid
logfile=/var/log/murmur/murmur.log
uname=murmur

# touch /var/log/murmur/murmur.log
# mkdir /var/log/murmur
# chown murmur:murmur /var/log/murmur
# chmod 0770 /var/log/murmur

in /etc/logrotate.d/murmur...

/var/log/murmur/*log {
su murmur murmur
dateext
rotate 4
missingok
notifempty
sharedscripts
delaycompress
postrotate
/bin/systemctl reload murmur.service > /dev/null 2>/dev/null || true
endscript
}

Mumble version

1.4.287

Mumble component

Server

OS

Linux

Additional information

No response

Krzmbrzl commented 2 years ago

Do you start the server in foreground mode (-fg)?

atomGit commented 2 years ago

apparently yes - i see -fg is used in the unit file - i removed that, but then...

murmurd[727]: murmurd: failed to open logfile /var/log/murmur/murmur.log: no logging will be done

the log file was set up as...

# mkdir /var/log/murmur
# touch /var/log/murmur/murmur.log
# chown murmur:murmur /var/log/murmur
# chmod 0770 /var/log/murmur
Krzmbrzl commented 2 years ago

apparently yes - i see -fg is used in the unit file - i removed that, but then...

Running the server in foreground mode disables logging to file.

mkdir /var/log/murmur

Doesn't this make your current user the owner of that file? Did you verify that other users (of other groups) have write permission to files of your normal user?

Are you actually running the server as user murmur? Could you try the following?:

sudo -u murmur echo "Test entry" > /var/log/murmur/murmur.log

to see if this executes without error.

Or as an alternative (or additional) test, change the server's log path to be located in /tmp/ where no users should encounter any permission issues when trying to access a file.

atomGit commented 2 years ago

Doesn't this make your current user the owner of that file?

yes, but i...

chown murmur:murmur /var/log/murmur

and the install sets up a murmur user and group, and in the ini i set uname=murmur

anyway, thanks for the advice but i'm not going to worry about this for now - systemd has me pissed off and that's very much related to what i'm trying to accomplish ... maybe time to move to Artix

Krzmbrzl commented 2 years ago

chown murmur:murmur /var/log/murmur

That only applies to the directory and not the actual log file though

atomGit commented 2 years ago

ah, so i should've chown -R then :)

Krzmbrzl commented 2 years ago

yes - or actually only change the ownership of the file itself. Unless you have non-default default permissions, I think every user can write to their own files, even though they reside in a directory owned by another user.