Article 5KNG7 Logs location - a philosophical question

Logs location - a philosophical question

by
taylorkh
from LinuxQuestions.org on (#5KNG7)
For years I have been running a systemd service which I wrote to access ProtonVPN on a small server which then shares the connection to my LAN. Proton recently released their "official" Linux VPN command line client. Of course they had to fix things and the new client will not run as root as far as I can tell. I think I know why and perhaps how to fix that. However, the path of less resistance is to run the service under my user account. That I am working on.

An issue arises with the logs I write from my service. Currently the service runs as root and I can simply write the logs from my script to /var/log/. As my user account I do NOT have write permission to that directory. I see three possibilities:

1 - Grant my user account write access to /var/log/
2 - Put the logs elsewhere - Is there a preferred place for logs generated by a civilian user?
3 - Use syslog to handle the logs from my service. I have no idea how to do that but probably should learn.

I am looking for suggestions and advice.

TIA,

Kenlatest?d=yIl2AUoC8zA latest?i=0ripjVMePVk:O6hWbBh8bEA:F7zBnMy latest?i=0ripjVMePVk:O6hWbBh8bEA:V_sGLiP latest?d=qj6IDK7rITs latest?i=0ripjVMePVk:O6hWbBh8bEA:gIN9vFw0ripjVMePVk
External Content
Source RSS or Atom Feed
Feed Location https://feeds.feedburner.com/linuxquestions/latest
Feed Title LinuxQuestions.org
Feed Link https://www.linuxquestions.org/questions/
Reply 0 comments