OpenVPN 2.7.4 running on Rasberry PI OS "Butch" (current and up to date as of today).
Setting up a client config file with these lines in it:
script-security 2
up "/usr/bin/python /root/nexthops.py 10.11.0.105 +tun1"
down "/usr/bin/python /root/nexthops.py 10.11.0.105 -tun1"
And OCCASIONALLY I get this in the /var/log/openvpn.log file:
Sat Sep 11 14:50:30 2021 /usr/bin/python /root/nexthops.py 10.11.0.105 +tun1 tun1 1500 1603 10.11.0.106 10.11.0.105 init
/usr/bin/python: can't open file '/root/nexthops.py': [Errno 2] No such file or directory
Sat Sep 11 14:50:30 2021 WARNING: Failed running command (--up/--down): external program exited with error status: 2
On an older Stretch version of Rasberry PI OS and OpenVPN 2.4.0, this never occurs and a did not need the
/usr/bin/python path in the
up or
down entries.
If I remove the
/usr/bin/python from the up / down entries, then I get the
Errno 2 all the time.
The first line of the nexthops.py script has:
#!/usr/bin/python
So I don't understand why I need to fully qualify the path to python in the first place (again, didn't have to do this on an older version of Rasbian OS
Any ideas what's going wrong / things for me to check / references?
Thanks!
UPDATE: I was wrong: It''s NOT running the UP or DOWN scripts at all. It's like OpenVPN cannot access the /root folder. But I thought OpenVPN runs under ROOT user by default?