Note: This is a public test instance of Red Hat Bugzilla. The data contained within is a snapshot of the live data so any changes you make will not be reflected in the production Bugzilla. Email is disabled so feel free to test any aspect of the site that you want. File any problems you find or give feedback at bugzilla.redhat.com.
Bug 1120544 - "sudo guestmount" changes the owner of a vdi file to qemu.qemu and does not reset the owner to the original one if unmounting with guestunmount
Summary: "sudo guestmount" changes the owner of a vdi file to qemu.qemu and does not r...
Keywords:
Status: CLOSED DUPLICATE of bug 636156
Alias: None
Product: Virtualization Tools
Classification: Community
Component: libvirt
Version: unspecified
Hardware: Unspecified
OS: Unspecified
unspecified
unspecified
Target Milestone: ---
Assignee: Libvirt Maintainers
QA Contact:
URL:
Whiteboard:
Depends On:
Blocks: TRACKER-bugs-affecting-libguestfs
TreeView+ depends on / blocked
 
Reported: 2014-07-17 06:54 UTC by Joachim Backes
Modified: 2016-04-10 19:06 UTC (History)
6 users (show)

Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Clone Of:
Environment:
Last Closed: 2016-04-10 19:06:05 UTC
Embargoed:


Attachments (Terms of Use)

Description Joachim Backes 2014-07-17 06:54:34 UTC
Description of problem:
Guest mounting a vdi file belonging to some user with "sudo guestmount -a <vdi file> -i --ro <mountpoint>"  sets the owner of the vdi file to qemu.qemu, but does not restore the original owner if unmounting with guestunmount.

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


How reproducible:
always

Steps to Reproduce:
1.sudo guestmount -a <some user vdi file> -i --ro <mount point>
2.sudo guestunmount <mount point>
3.

Actual results:
The owner of <some user vdi file> is now qemu.qemu

Expected results:
The owner is reset to the original owner

Additional info:

ls -l /vbox/win7.vdi

-rw-------. 1 backes backes 35174649856 Jul 17 07:01 /vbox/win7.vdi
backes@eule [~]: sudo guestmount -a /vbox/win7.vdi -i --ro /mnt
backes@eule [~]: ls -l /vbox/win7.vdi
-rw-------. 1 qemu qemu 35174649856 Jul 17 07:01 /vbox/win7.vdi
backes@eule [~]: sudo guestunmount /mnt
backes@eule [~]: ls -l /vbox/win7.vdi
-rw-------. 1 qemu qemu 35174649856 Jul 17 07:01 /vbox/win7.vdi

Comment 1 Richard W.M. Jones 2014-07-17 07:40:18 UTC
libvirt does the chown.  It should chown it back, but does not.
I think there is an open bug about this.

If you want to avoid it, then tell libguestfs to run qemu directly,
without using libvirt:

  export LIBGUESTFS_BACKEND=direct

Comment 2 Cole Robinson 2016-04-10 19:06:05 UTC
The lack of restoring to the original owner/group is tracked in bug 636156

*** This bug has been marked as a duplicate of bug 636156 ***


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