Il 22/09/2016 16:07, debbie10t ha scritto: > Hi > > posting in devel because I am asking for clarification of > what the source code really does. > > Re: https://forums.openvpn.net/viewtopic.php?f=30&t=22485 > > Config: > |--- > server *normal stuff* > log-append /tmp/openvpn.log > --- > > I have just tried with Ubuntu1604 myself and observe that: > (My basic config I added: --log /tmp/client1.log) > > 1. $ sudo systemctl start openvpn@client1 = log file *not* created > 2. $ sudo openvpn client1.conf = log file created normally in /tmp > > Obviously, systemctl start openvpn@client1 appends more options when > starting openvpn (in my hand written service the only addition is > --daemon client1) So I presume that by daemonizing something changes > with regard to writing the log file to /tmp ?? > > Also note, in the forum post --daemon is used within the config file. > > I did grep -E "/tmp" src/openvpn/* and found some code in init.c > (line 664) but it's all C, foo, bar to me (Sea food bar ;-) ) > > Anyhoo, can anybody provide a brief and simple explanation ? > > Many thanks >
Hi, I did some testing on my Ubuntu 16.04 VM, and this seems like a permission issue, probably related to the capabilities set in the openvpn unit file: /lib/systemd/system/openvpn@.service Basically --log and --log-append will work, if the logfile is stored under /etc/openvpn. If you try to put the it under /tmp, it will never appear. That said, you probably would not need a logfile, as you can view them with $ journalctl /usr/sbin/openvpn -- Samuli Seppänen Community Manager OpenVPN Technologies, Inc irc freenode net: mattock ------------------------------------------------------------------------------ _______________________________________________ Openvpn-devel mailing list Openvpn-devel@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/openvpn-devel