[prev in list] [next in list] [prev in thread] [next in thread] 

List:       libvirt-users
Subject:    Re: [libvirt-users] command guest-file-open failed to open file - Permission denied
From:       Michal Privoznik <mprivozn () redhat ! com>
Date:       2016-10-30 21:25:39
Message-ID: ed5616d5-3506-8933-4332-96c4ebf4d2ab () redhat ! com
[Download RAW message or body]

On 27.10.2016 11:50, 刘梦可 wrote:
> hello,
> 
> I am using  libvirt 1.2.17 on CentOS 7.2 - kernel
> 3.10.0-327.13.1.el7.x86_64. The command guest-file-open failed to open
> file with error "Permission denied", the detail is as below:
> 
> virsh qemu-agent-command instance-00000a9c
> '{"execute":"guest-file-open",
> "arguments":{"path":"/home/centos/test","mode":"r"}}'
> error: internal error: unable to execute QEMU agent command
> 'guest-file-open': failed to open file '/home/centos/test' (mode:
> 'r'): Permission denied
> 
> In the guest, the file '/home/centos/test' exist and the access
> permissions is 777 as below:
> -rwxrwxrwx. 1 centos centos 18 Oct 27 11:16 test

This is likely denied because of SELinux. You can check audit log to
confirm that. To fix this you need to change the label on the file and
to do that properly you need to add a rule.

Michal

[prev in list] [next in list] [prev in thread] [next in thread] 

Configure | About | News | Add a list | Sponsored by KoreLogic