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:
Patches posted on the ml: https://www.redhat.com/archives/libguestfs/2016-May/msg00143.html https://www.redhat.com/archives/libguestfs/2016-May/msg00144.html
Fixed with https://github.com/libguestfs/libguestfs/commit/59690dfc0429e4c349d4022a9a6739566c5e2c0d https://github.com/libguestfs/libguestfs/commit/b5c81b3e1212d9a6d4993ccf7e54e2e5d39606bc which are in libguestfs >= 1.33.30.
Also fixed in libguestfs 1.32.5.