cannot scp from home folder

Bug #1989120 reported by Pietro Pasotti
8
This bug affects 1 person
Affects Status Importance Assigned to Milestone
Canonical Juju
Fix Committed
High
Unassigned

Bug Description

juju scp ~/foo.txt unit:path fails with
ERROR make tar... failed: open /home/pietro/foo.txt: permission denied

cp ~/foo.txt ~/.local/share/juju/foo.txt
juju scp ~/.local/share/juju/foo.txt unit:path works!

The personal-files interface probably needs to be adjusted a bit.

Revision history for this message
John A Meinel (jameinel) wrote :

So using juju from latest/beta I get a different failure
$ /snap/bin/juju --version --all
version: 3.0-beta4-genericlinux-amd64
git-commit: a13ab81a2317fdf9ae91f62de0dd69b33c17752e
git-tree-state: archive
compiler: gc

$ /snap/bin/juju scp ~/hello.txt ul/0:.
ERROR fork/exec /usr/bin/scp: permission denied

but using juju from latest/edge:
$ /snap/bin/juju --version --all
version: 3.0-rc1-genericlinux-amd64
git-commit: d9be16a7f5d70eab16a83dbed495a5aa20fce899
git-tree-state: archive
compiler: gc

$ /snap/bin/juju scp ~/hello.txt ul/0:.
$ /snap/bin/juju ssh ul/0 -- ls
hello.txt

Revision history for this message
John A Meinel (jameinel) wrote :

I think this is important but it might already be fixed in the 3.0/edge work and I wasn't able to reproduce your findings.

Changed in juju:
importance: Undecided → High
status: New → Incomplete
milestone: none → 3.0-rc1
Changed in juju:
milestone: 3.0-rc1 → none
Revision history for this message
Simon Déziel (sdeziel) wrote (last edit ):

That appears to still be an issue with 3.0.3 from edge:

root@shell01:~# snap list juju
Name Version Rev Tracking Publisher Notes
juju 3.0.3-5ee11fe 21668 3.0/edge canonical✓ -

A possible workaround is to run this:

# snap connect juju:home

Changed in juju:
status: Incomplete → Confirmed
Revision history for this message
Ian Booth (wallyworld) wrote :

I just tried it and it worked here.

$ snap list juju
Name Version Rev Tracking Publisher Notes
juju 3.0.3-342e75d 21675 3.0/edge canonical✓ -

The home interface is supposed to be auto connected. If it's not, we'd need to investigate.

$ snap connections juju
Interface Plug Slot Notes
content - juju:juju-bin -
content[microk8s] juju:peers microk8s:microk8s -
desktop juju:desktop :desktop -
home juju:home :home -
lxd juju:lxd lxd:lxd -
network juju:network :network -
network-bind juju:network-bind :network-bind -
personal-files juju:config-lxd :personal-files -
personal-files juju:dot-aws :personal-files -
personal-files juju:dot-azure :personal-files -
personal-files juju:dot-google :personal-files -
personal-files juju:dot-kubernetes :personal-files -
personal-files juju:dot-local-share-juju :personal-files -
personal-files juju:dot-maas :personal-files -
personal-files juju:dot-openstack :personal-files -
personal-files juju:dot-oracle :personal-files -
ssh-keys juju:ssh-keys :ssh-keys -

Revision history for this message
Simon Déziel (sdeziel) wrote :

@Ian, had you previously done the connection manually by any chance? I found that connections persist through `snap remove/install/refresh` so I had to `snap remove --purge juju` to test this properly.

I should probably test this out on a fresh system but I can assure you that switching from 2.9 to 3.0 didn't do the auto connect. This transition was done initially using `snap refresh juju --channel 3.0/stable` in my case.

Revision history for this message
Ian Booth (wallyworld) wrote :

Yeah, I did remove --purge (I had 2.9 installed and removed --purge to install 3.0/edge).

I just freshly installed the snap in a new lxd container and it seemed to connect as expected.

ubuntu@juju-ea49af-0:~$ sudo snap install juju --channel=3.0/edge
juju (3.0/edge) 3.0.3-342e75d from Canonical✓ installed
ubuntu@juju-ea49af-0:~$ snap connections juju
Interface Plug Slot Notes
content - juju:juju-bin -
content juju:peers - -
desktop juju:desktop :desktop -
home juju:home :home -
...

Revision history for this message
Simon Déziel (sdeziel) wrote :

@Ian, thanks, I can confirm your observation that 3.0/edge (3.0.3) is indeed fixed, excellent!

Changed in juju:
status: Confirmed → Fix Committed
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.