local environment broken with root perms

Bug #1269363 reported by John A Meinel
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
juju-core
Fix Released
Critical
Tim Penhey

Bug Description

Currently using trunk (r2207) I see several failures wrt ssh and files/dirs owned by root.

After doing "sudo juju bootstrap -e local --debug"

I end up having a new
~/.ssh/authorized_keys file which is owned "root:root"

Trying to deploy something fails:
$ juju deploy -e local ubuntu --debug
error: cannot load ssh client keys: open /home/jameinel/.juju/ssh: permission denied

This is extra bad, because 'deploy' doesn't need to SSH into anything, so I don't quite see why it would break.
If I chown -R jameinel: ~/.juju/ssh then things seems to work.

But:
a) I don't think we want to mutate/write the host's ~/.ssh/authorized_keys file (if we did, then we should probably only do that on an 'ubuntu' user

b) The ~/.juju/ssh directory ends up owned by root rather than the user, and then it can't be read by future commands

Related branches

Revision history for this message
Tim Penhey (thumper) wrote :

OK, there are two issues here.

a) modifying ~/.ssh/authorized_keys is wrong, and the worker that was messing with that has been stopped.

... r2207? that really shouldn't be modifying the host authorized_keys...

b) the ~/.juju/ssh directory owned by root is a problem.

Changed in juju-core:
assignee: nobody → Tim Penhey (thumper)
status: Triaged → In Progress
Revision history for this message
Tim Penhey (thumper) wrote :

Now I'm confused...

I just bootstrapped a new local environ, with r2210, and had neither of the issues you mention above.

Revision history for this message
Tim Penhey (thumper) wrote :

Ahh... got it now...

Tim Penhey (thumper)
Changed in juju-core:
milestone: 1.17.1 → 2.0
Tim Penhey (thumper)
Changed in juju-core:
status: In Progress → Fix Committed
John A Meinel (jameinel)
Changed in juju-core:
milestone: 2.0 → 1.17.1
Curtis Hovey (sinzui)
Changed in juju-core:
status: Fix Committed → Fix Released
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.