defining debug.log and data locations in linux

For help and support with Universal Media Server
Forum rules
Please make sure you follow the Problem Reporting Guidelines before posting if you want a reply
Post Reply
stuartjk1606
Posts: 10
Joined: Thu Apr 16, 2015 5:49 am

defining debug.log and data locations in linux

Post by stuartjk1606 »

Is there any way to define the debug.log and data locations in a Linux build of UMS (Currently using 5.1.3)?

I have been working on finalising my Ubuntu 14.04 server build hosting UMS and have found the log file location to be some what problematic. I have a super user (sup1) with sudo rights, which I used to prove the config and identify where all the files were written to, I then set up a service user "ums" (with home drive) and ensured the new user had permissions to all the relevant files and directories. Simply running the ums.sh script that comes with the package placed logs in /home/{user}/.config/UMS/debug.log so not too worried.

I then set up UMS as a service in init.d and tried to run as a daemon. This appears to no longer be writing to /home/{user}/.config/UMS/debug. I therefore changed the daemon lines in the init.d script to start as root. This now placed the log file in /var/log/universalmediaserver/root/debug.log. What? Why? What told it to do this? It makes sense but why not put it here with other users, especially seeing as UMS advises not to run as root.

Running as user "ums" again and I managed to trace back a syslog entry stating ums was trying to write to /tmp/universalmediaserver/, changing the owner of this directory allowed UMS to start and it placed the log file here. Yet another completely different location.

So it looks like if you run UMS in user mode it writes to the user home directory, if you run as root it writes to /var/log/ and if you run as daemon user it writes to /tmp/.

It would also be useful if we could determine where the runtime files go as once again I have had to change the owner of /etc/data too in order to allow pms.pid, resume and UMS.* files to be written and accessible. Once again, when run in user mode, this is written to /home/{user}/.config/UMS/data/ and /etc/data/ in daemon mode/root.

Can someone explain the reasoning to me or if there is some way of defining where the log and data files are written to in all instances? Ideally I would like to control their location.

Thanks
Post Reply