idlab-discover / easy-openvpn-server

Plug-and-play OpenVPN server which generates server and client config files for you
https://snapcraft.io/easy-openvpn-server
GNU Affero General Public License v3.0
69 stars 9 forks source link

Unable to run commands as SU #3

Closed DeadDjembe closed 3 years ago

DeadDjembe commented 3 years ago

I followed the instructions to install and was able to install successfully, However I am unable to run easy-open-vpn-server but the server appears to be running.

pi@raspberrypi:~ $ easy-openvpn-server setup
ERROR: Please run this as root!
pi@raspberrypi:~ $ sudo easy-openvpn-server setup
sudo: easy-openvpn-server: command not found
pi@raspberrypi:~ $ sudo easy-openvpn-server show-client default > default.ovpn
sudo: easy-openvpn-server: command not found
pi@raspberrypi:~ $ snap services
Service                         Startup  Current   Notes
adguard-home.adguard-home       enabled  active    -
easy-openvpn.easy-openvpn       enabled  inactive  -
easy-openvpn-server.tcp-server  enabled  active    -
easy-openvpn-server.udp-server  enabled  active    -

But, I am able to set the server ports pi@raspberrypi:~ $ sudo snap set easy-openvpn-server udp-server.port=1234

merlijn-sebrechts commented 3 years ago

Can you try sudo snap run easy-openvpn-server setup instead? It might be that the snap binaries are not in the PATH of the root user.

DeadDjembe commented 3 years ago

Can you try sudo snap run easy-openvpn-server setup instead? It might be that the snap binaries are not in the PATH of the root user.

This worked, thanks for the guidance.

merlijn-sebrechts commented 3 years ago

This is an issue with the snapd package in raspbian/debian. Can you file a bug report there?

The PATH needs to be updated to include the paths of Snap binaries. It seems the PATH is only updated for your user account and not for the root account.

DeadDjembe commented 3 years ago

This is an issue with the snapd package in raspbian/debian. Can you file a bug report there?

The PATH needs to be updated to include the paths of Snap binaries. It seems the PATH is only updated for your user account and not for the root account.

Will do, thanks,