Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!

Bug 514704

Summary: net-misc/openvpn-2.3.2 - pid file created with wrong permissions
Product: Gentoo Linux Reporter: Zoltán Halassy <zhalassy>
Component: Current packagesAssignee: William Hubbs <williamh>
Status: UNCONFIRMED ---    
Severity: normal CC: chutzpah, williamh
Priority: Normal    
Version: unspecified   
Hardware: AMD64   
OS: Linux   
Whiteboard:
Package list:
Runtime testing required: ---

Description Zoltán Halassy 2014-06-23 15:54:39 UTC
/etc/init.d/openvpn init script adds --writepid to create a pid file for the process. openvpn drops root privileges after forking to the background. When openvpn receives the HUP signal, it disconnects and rereads the configuration files. Because openvpn doesn't have root privileges anymore, it exits with an error message:

Options error: --writepid fails with '/var/run/openvpn.pid': Permission denied

A chown command after the start-stop-daemon execution would solve this problem.

Reproducible: Always

Steps to Reproduce:
1. Install OpenVPN as a daemon (server)
2. killall -HUP openvpn
Actual Results:  
OpenVPN cannot write the pid file, so it exits with an error message.

Expected Results:  
The openvpn pid file should be owned by the user which runs the openvpn process, so the process can write to the file.