Bug 1260801
Summary: | virt-builder --ssh-inject doesn't set proper permissions on created files | ||
---|---|---|---|
Product: | Red Hat Enterprise Linux 7 | Reporter: | Richard W.M. Jones <rjones> |
Component: | libguestfs | Assignee: | Richard W.M. Jones <rjones> |
Status: | CLOSED ERRATA | QA Contact: | Virtualization Bugs <virt-bugs> |
Severity: | medium | Docs Contact: | |
Priority: | unspecified | ||
Version: | 7.3 | CC: | leiwang, linl, ptoscano, rbalakri, rsawhill, sherold, wshi, xchen |
Target Milestone: | rc | ||
Target Release: | --- | ||
Hardware: | Unspecified | ||
OS: | Unspecified | ||
Whiteboard: | |||
Fixed In Version: | libguestfs-1.32.0-2.el7 | Doc Type: | Bug Fix |
Doc Text: | Story Points: | --- | |
Clone Of: | 1260778 | Environment: | |
Last Closed: | 2016-11-03 17:54:43 UTC | Type: | Bug |
Regression: | --- | Mount Type: | --- |
Documentation: | --- | CRM: | |
Verified Versions: | Category: | --- | |
oVirt Team: | --- | RHEL 7.3 requirements from Atomic Host: | |
Cloudforms Team: | --- | Target Upstream Version: | |
Embargoed: | |||
Bug Depends On: | 1218766, 1260778 | ||
Bug Blocks: | 1288337, 1301891 |
Description
Richard W.M. Jones
2015-09-07 21:21:32 UTC
This has been fixed with https://github.com/libguestfs/libguestfs/commit/5ed4388ecd5fdb7639622ee4fba317c276547257 which is in libguestfs >= 1.31.5. The rebase (bug #1218766) will pick this bug fix (and the feature too, actually :) ) as well. Verified with the packages: libguestfs-1.32.5-6.el7.x86_64 Verify steps: 1. Build a Fedora guest image and inject your public key and a string to the guest: # virt-builder fedora-23 --arch i686 -o fedora-23.img --ssh-inject root:file:/root/.ssh/id_rsa.pub --ssh-inject root:string:"ssh-rsa AAtesttesttest" Command finished successfully and there should be a image: fedora-23.img2. 2. Check the permission: # guestfish -a tmp.qcow2 -i ll /root/.ssh/ drwx------ 2 root root 28 Jun 21 09:14 . dr-xr-x---. 5 root root 4096 Jun 21 09:14 .. -rw------- 1 root root 402 Jun 21 09:14 authorized_keys The permission of .ssh is 0700 and authorized_keys is 0600. So verified. Since the problem described in this bug report should be resolved in a recent advisory, it has been closed with a resolution of ERRATA. For information on the advisory, and where to find the updated files, follow the link below. If the solution does not work for you, open a new bug report. https://rhn.redhat.com/errata/RHSA-2016-2576.html |