Score:0

Openvpn as nobody fails: Options error: --status fails with '/var/log/openvpn/openvpn-status.log': Permission denied (errno=13)

in flag

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?

mangohost

Post an answer

Most people don’t grasp that asking a lot of questions unlocks learning and improves interpersonal bonding. In Alison’s studies, for example, though people could accurately recall how many questions had been asked in their conversations, they didn’t intuit the link between questions and liking. Across four studies, in which participants were engaged in conversations themselves or read transcripts of others’ conversations, people tended not to realize that question asking would influence—or had influenced—the level of amity between the conversationalists.