Snap binaries are only available for user account and not root account on Raspbian
Bug #1938921 reported by
Marc
This bug affects 1 person
Affects | Status | Importance | Assigned to | Milestone | |
---|---|---|---|---|---|
Snappy |
Invalid
|
Undecided
|
Unassigned |
Bug Description
There is an issue with the snapd package in raspbian/debian.
The PATH needs to be updated to include the paths of Snap binaries. It seems the PATH is only updated for the user account and not for the root account.
I am unable to run Snap installed programs as root unless it's run through Snap.
example using easy-openvpn-
pi@raspberrypi:~ $ easy-openvpn-server setup
ERROR: Please run this as root!
pi@raspberrypi:~ $ sudo easy-openvpn-server setup
sudo: easy-openvpn-
however the following command works:
sudo snap run easy-openvpn-server setup
To post a comment you must log in.
That's because raspbian most likely overrides the PATH by setting secure_path in /etc/sudoers. You could probably workaround that by using `sudo -l ...` or if that does not work you can run `sudo snap run easy-openvpn-server setup`.