Bug 705200

Summary: guestmount attempt results in access denied
Product: [Fedora] Fedora Reporter: Julian Sikorski <belegdol>
Component: libguestfsAssignee: Richard W.M. Jones <rjones>
Status: CLOSED ERRATA QA Contact: Fedora Extras Quality Assurance <extras-qa>
Severity: unspecified Docs Contact:
Priority: unspecified    
Version: 15CC: mbooth, mgoldman, rjones, virt-maint
Target Milestone: ---   
Target Release: ---   
Hardware: Unspecified   
OS: Unspecified   
Whiteboard:
Fixed In Version: libguestfs-1.10.4-1.fc15 Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2011-05-17 14:10:16 EDT Type: ---
Regression: --- Mount Type: ---
Documentation: --- CRM:
Verified Versions: Category: ---
oVirt Team: --- RHEL 7.3 requirements from Atomic Host:
Attachments:
Description Flags
output of guestmount --trace --verbose none

Description Julian Sikorski 2011-05-16 19:33:34 EDT
Created attachment 499243 [details]
output of guestmount --trace --verbose

Description of problem:
I am unable to mount my windows VM image - guestmount apparently succeeds, but then any attempt to access the mount point results in access denied, even as root.

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

How reproducible:
always

Steps to Reproduce:
1.
2.
3.
  
Actual results:


Expected results:


Additional info:
Comment 1 Richard W.M. Jones 2011-05-17 03:30:35 EDT
Are you running guestmount as root?

What precise guestmount command do you run?

After it has mounted, what command do you run on the mount point?

Do you run these other command(s) as root or non-root?

Do you run fusermount -u and if so, when?
Comment 2 Julian Sikorski 2011-05-17 04:43:35 EDT
For reference, I was able to access the data on the image using the kpartx approach:
http://docs.redhat.com/docs/en-US/Red_Hat_Enterprise_Linux/6/html/Virtualization/sect-Virtualization-Troubleshoot_on_guest_disk_image.html
Comment 3 Richard W.M. Jones 2011-05-17 05:08:01 EDT
Setting back to NEEDINFO on questions in comment 1.
Comment 4 Julian Sikorski 2011-05-17 14:10:16 EDT
(In reply to comment #1)
> Are you running guestmount as root?
> 
> What precise guestmount command do you run?

The exact command used to produce this log was the following:
$ sudo guestmount -a/var/lib/libvirt/images/windows.img -m /dev/vda2 --trace --verbose --ro /mnt/loop > guestmount.log 2>&1

> After it has mounted, what command do you run on the mount point?

I did not run any commands on the mount point. I tried running chown and chmod to enable access, but to no avail
 
> Do you run these other command(s) as root or non-root?
> 
> Do you run fusermount -u and if so, when?

I did not try fusermount -u.

I could have sworn I tried to access the mounted system as root, but my console logs prove otherwise. It was late, I guess...
Anyway, I tried with -o allow_other and now everything seems to work fine. This command makes the image browsable in nautilus:
$ sudo guestmount -d windows -i --ro -o allow_other /mnt/loop
Sorry for the noise, I guess.
Comment 5 Richard W.M. Jones 2011-05-17 14:52:47 EDT
That's OK.  I have added a note to the manual page:

http://git.annexia.org/?p=libguestfs.git;a=commitdiff;h=b777a5a64926e9bf9b7109a0e4fb1332b20fa37f
Comment 6 Fedora Update System 2011-06-13 16:52:29 EDT
libguestfs-1.10.4-1.fc15 has been submitted as an update for Fedora 15.
https://admin.fedoraproject.org/updates/libguestfs-1.10.4-1.fc15
Comment 7 Fedora Update System 2011-06-23 23:50:09 EDT
libguestfs-1.10.4-1.fc15 has been pushed to the Fedora 15 stable repository.  If problems still persist, please make note of it in this bug report.