Permissions denied with openvpn client in Ubuntu 25.04:
Starting with Ubuntu 25.04, the apparmor security feature will block openvpn config files from running in non-standard places like /opt.
You could allow the non-standard place in a whitelist or disable apparmor.
both are not recommended, the whitelist usually still does not work even after permitting the location, along with disabling apparmor is very dangerous.
Just store the ovpn file under the default location of: /etc/openvpn/client
And then run the ovpn by: sudo openvpn /etc/openvpn/client/my-cert.ovpn
Sources:
- https://www.reddit.com/r/OpenVPN/comments/1fz9alb/error_opening_configuration_file/
- https://branden-g.ca/Notes/Tech-Help/Linux-Repair/Linux-File-changes/File-Permissions/Give-user-ownership-to-opt-folder.php
- https://search.brave.com/search?q=ubuntu+apparmor&source=web&summary=1&conversation=fd47d53b9a66a43c7bd733
- https://search.brave.com/search?q=ubuntu+apparmor+allow+openvpn&source=web&summary=1&conversation=96488535c095f94a8f8e84
Date: November 17th 2025
Back
© 2019 to 2025 Branden Gilfoil &
© up to 2025 for respective owners.