Bug 1337561 - virt-customize --ssh-inject not applying correct file permission
Summary: virt-customize --ssh-inject not applying correct file permission
Keywords:
Status: CLOSED UPSTREAM
Alias: None
Product: Virtualization Tools
Classification: Community
Component: libguestfs
Version: unspecified
Hardware: x86_64
OS: Linux
unspecified
unspecified
Target Milestone: ---
Assignee: Richard W.M. Jones
QA Contact:
URL:
Whiteboard:
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2016-05-19 13:09 UTC by Daniel
Modified: 2016-06-02 12:18 UTC (History)
2 users (show)

Fixed In Version:
Doc Type: If docs needed, set a value
Doc Text:
Clone Of:
Environment:
Last Closed: 2016-05-20 13:46:30 UTC
Embargoed:


Attachments (Terms of Use)

Description Daniel 2016-05-19 13:09:19 UTC
Description of problem:
When running 'virt-customize -a animage --ssh-inject auser' everything seems to go well but when inspecting the guest it is noticed that authorized_keys is created under auser's .ssh but the file is owned by root:root

Version-Release number of selected component (if applicable):
libguestfs-1.32.4-1.fc23.x86_64

How reproducible:
Always

Steps to Reproduce:
1. build a virtual machine image and make sure a non root username is created 
2. run virt-customize -a <image name> --ssh-inject <username>
3.

Actual results:
<username home dir>/.ssh/authorized_keys ownership is root:root

Expected results:
<username home dir>/.ssh/authorized_keys should be owned by the username

Additional info:

Comment 3 Richard W.M. Jones 2016-06-02 12:18:37 UTC
Also fixed in libguestfs 1.32.5.


Note You need to log in before you can comment on or make changes to this bug.