nm-openvpn: ERROR: Cannot ioctl TUNSETIFF tun: Operation not permitted (errno=1)
When connecting to an OpenVPN server using nm-openvpn connections will break after the ping-timeout:
nm-openvpn[499347]: [my.example.vpn.com] Inactivity timeout (--ping-restart), restarting
nm-openvpn[499347]: SIGUSR1[soft,ping-restart] received, process restarting
[..]
nm-openvpn[499347]: ERROR: Cannot ioctl TUNSETIFF tun: Operation not permitted (errno=1)
nm-openvpn[499347]: Exiting due to fatal error
This happens because the tun interface is created by user "root" opposed to nm-openvpn being run by user "nm-openvpn".
Would it be possible to create the tun0 interface with the user rights of "nm-openvpn"? (See here and here for reference)