/snap/bin isn't in PATH in a non-interactive shell, eg. via ssh

Bug #1777445 reported by Robie Basak
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
openssh (Ubuntu)
New
Undecided
Unassigned
snapd (Ubuntu)
New
Undecided
Unassigned

Bug Description

snapd 2.32.9

On a fresh VM (eg. Bionic), if from another machine I type:

ssh <host> 'echo $PATH'

/snap/bin doesn't appear. This causes, for example when I'm running lxd from the snap:

ssh <host> 'lxc profile set default ...'

to fail.

This is similar but I think subtly different from bug 1771858 since I don't think systemd will sit between ssh and its child non-interactive session, so to fix this case do we need to hook into ssh eg. via PAM? Or edit /etc/environment. I think some proposed fixes for bug 1771858 won't fix this case so I'm filing this separately.

To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.