You are not logged in.

#1 2017-04-01 02:31:53

x1site
Member
Registered: 2013-10-20
Posts: 60

[SOLVED] OpenVPN start fails. "No such file or directory" but readable

Hi!

systemctl start openvpn-client@client

Always fails with errors:

Apr 01 09:07:18 dm openvpn[638]: Options error: --ca fails with '/home/dm/VPN_RSA/ca.crt': No such file or directory
Apr 01 09:07:18 dm openvpn[638]: Options error: --cert fails with '/home/dm/VPN_RSA/saturn.crt': No such file or directory
Apr 01 09:07:18 dm openvpn[638]: WARNING: cannot stat file '/home/dm/VPN_RSA/saturn.key': No such file or directory (errno=2)
Apr 01 09:07:18 dm openvpn[638]: Options error: --key fails with '/home/dm/VPN_RSA/saturn.key': No such file or directory

but

openvpn /etc/openvpn/client/client.conf

works fine
Files above is readable for everyone.
What is wrong? Before I update system everything worked fine

Last edited by x1site (2017-04-01 03:04:46)


awesome + rofi

Offline

#2 2017-04-01 02:42:56

Docbroke
Member
From: India
Registered: 2015-06-13
Posts: 1,372

Re: [SOLVED] OpenVPN start fails. "No such file or directory" but readable

Please post your service file for openvpn-client@client


Arch is home!
cwm rofi weaver clifm vis lizzy pass terminator
https://github.com/Docbroke

Offline

#3 2017-04-01 02:50:01

x1site
Member
Registered: 2013-10-20
Posts: 60

Re: [SOLVED] OpenVPN start fails. "No such file or directory" but readable

Docbroke wrote:

Please post your service file for openvpn-client@client

Thanks. It was due to probably new service file for openvpn with home protection enabled by default

[Unit]
Description=OpenVPN tunnel for %I
After=syslog.target network-online.target
Wants=network-online.target
Documentation=man:openvpn(8)
Documentation=https://community.openvpn.net/openvpn/wiki/Openvpn24ManPage
Documentation=https://community.openvpn.net/openvpn/wiki/HOWTO

[Service]
Type=notify
PrivateTmp=true
WorkingDirectory=/etc/openvpn/client
ExecStart=/usr/bin/openvpn --suppress-timestamps --nobind --config %i.conf
CapabilityBoundingSet=CAP_IPC_LOCK CAP_NET_ADMIN CAP_NET_RAW CAP_SETGID CAP_SETUID CAP_SYS_CHROOT CAP_DAC_OVERRIDE
LimitNPROC=10
DeviceAllow=/dev/null rw
DeviceAllow=/dev/net/tun rw
ProtectSystem=true 
ProtectHome=true

[Install]
WantedBy=multi-user.target

awesome + rofi

Offline

#4 2017-04-01 02:55:31

Docbroke
Member
From: India
Registered: 2015-06-13
Posts: 1,372

Re: [SOLVED] OpenVPN start fails. "No such file or directory" but readable

Glad, that it worked out.
It this is solved, please mark it solved.
To avoid such overwriting in future you can copy your service file to /etc/systemd/system/ from default /usr/lib/sytemd/system


Arch is home!
cwm rofi weaver clifm vis lizzy pass terminator
https://github.com/Docbroke

Offline

Board footer

Powered by FluxBB