Openvpn as nobody fails: Options error: --status fails with '/var/log/openvpn/openvpn-status.log': Permission denied (er

This forum is for all inquiries relating to the installation of OpenVPN from source and with binaries.

Moderators: TinCanTech, TinCanTech, TinCanTech, TinCanTech, TinCanTech, TinCanTech

Forum rules
Please visit (and READ) the OpenVPN HowTo http://openvpn.net/howto prior to asking any questions in here!
Post Reply
vincentt
OpenVpn Newbie
Posts: 1
Joined: Tue Aug 01, 2023 2:42 pm

Openvpn as nobody fails: Options error: --status fails with '/var/log/openvpn/openvpn-status.log': Permission denied (er

Post by vincentt » Tue Aug 01, 2023 2:44 pm

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.

Code: Select all

sudo -u nobody openvpn /etc/openvpn/server/server.conf
However I have the following error:

Code: Select all

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

Code: Select all

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/

Code: Select all

# 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

Post Reply