Openvpn on Ubuntu 22.04
I can run successfully openvpn as superuser. Now I want to run it as user nobody before making it a service.
sudo -u nobody openvpn /etc/openvpn/server/server.conf
However I have the following error:
sudo -u nobody openvpn /etc/openvpn/server/server.conf
Options error: --status fails with '/var/log/openvpn/openvpn-status.log': Permission denied (errno=13)
Options error: Please correct these errors.
Use --help for more information.
I tried to chown openvpn-status.log as nobody.nogroup with 666 rights
ls -hal /var/log/openvpn/
total 8.0K
drwxr-xr-x 1 root root 50 jui 30 12:42 .
drwxrwxr-x 1 root syslog 3.4K jui 30 12:42 ..
-rw------- 1 root root 18 jui 30 11:25 ipp.txt
-rw-rw-rw- 1 nobody nogroup 227 jui 30 11:24 openvpn-status.log
But I still get the exact same error. I also tried to change the status file location to /var/log/
# Output a short status file showing
# current connections, truncated
# and rewritten every minute.
status /var/log/openvpn-status.log
Still the same error.
Any idea how to proceed? thank you