[Pkg-libvirt-commits] [libguestfs] 81/87: FAQ: Another common problem is permission denied errors when running as root.

Hilko Bengen bengen at moszumanska.debian.org
Wed Feb 19 21:10:17 UTC 2014


This is an automated email from the git hooks/post-receive script.

bengen pushed a commit to branch debian
in repository libguestfs.

commit 06e37a435bf76825eea6eb49d58a530b29d463fe
Author: Richard W.M. Jones <rjones at redhat.com>
Date:   Wed Feb 12 09:32:08 2014 +0000

    FAQ: Another common problem is permission denied errors when running as root.
    
    (cherry picked from commit 82a4a8f02c5706979d961ad6c4ac767a37a3a7c9)
---
 examples/guestfs-faq.pod | 39 +++++++++++++++++++++++++++++++++++++++
 1 file changed, 39 insertions(+)

diff --git a/examples/guestfs-faq.pod b/examples/guestfs-faq.pod
index a7b6075..5a45c96 100644
--- a/examples/guestfs-faq.pod
+++ b/examples/guestfs-faq.pod
@@ -167,6 +167,45 @@ following command:
 
  sudo update-guestfs-appliance
 
+=head2 "Permission denied" when running libguestfs as root
+
+You get a permission denied error when opening a disk image, even
+though you are running libguestfs as root.
+
+This is caused by libvirt, and so only happens when using the libvirt
+backend.  When run as root, libvirt decides to run the qemu appliance
+as user C<qemu.qemu>.  Unfortunately this usually means that qemu
+cannot open disk images, especially if those disk images are owned by
+root, or are present in directories which require root access.
+
+There is a bug open against libvirt to fix this:
+L<https://bugzilla.redhat.com/show_bug.cgi?id=1045069>
+
+You can work around this by one of the following methods:
+
+=over 4
+
+=item *
+
+Switch to the direct backend:
+
+ export LIBGUESTFS_BACKEND=direct
+
+=item *
+
+Don't run libguestfs as root.
+
+=item *
+
+Chmod the disk image and any parent directories so that the qemu user
+can access them.
+
+=item *
+
+(Nasty) Edit C</etc/libvirt/qemu.conf> and change the C<user> setting.
+
+=back
+
 =head2 execl: /init: Permission denied
 
 B<Note:> If this error happens when you are using a distro package of

-- 
Alioth's /usr/local/bin/git-commit-notice on /srv/git.debian.org/git/pkg-libvirt/libguestfs.git



More information about the Pkg-libvirt-commits mailing list