[libvirt] [PATCH 4/6] storage: fs: Don't try to chown directory unless user requested

Peter Krempa pkrempa at redhat.com
Tue Apr 28 13:33:20 UTC 2015

On Mon, Apr 27, 2015 at 16:48:42 -0400, Cole Robinson wrote:
> Currently we try to chown any directory passed to virDirCreate,
> even if the user didn't request any explicit owner/group via the
> pool/vol XML.
> This causes issues with qemu:///session: try to build a pool of
> a root owned directory like /tmp, and it fails trying to chown the
> directory to the session user. Instead it should just leave things
> as they are, unless the user requests changing permissions via
> the pool XML.
> Similarly this is annoying if creating a storage pool via system
> libvirtd of an existing directory in user $HOME, it's now owned
> by root.
> The virDirCreate function is pretty convoluted, since it needs to
> fork off in certain specific cases. Try to document that, to make
> it clear where exactly we are changing behavior.
> ---
>  src/util/virfile.c | 32 +++++++++++++++++++++++---------
>  1 file changed, 23 insertions(+), 9 deletions(-)


-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 819 bytes
Desc: Digital signature
URL: <http://listman.redhat.com/archives/libvir-list/attachments/20150428/bdc0e6b4/attachment-0001.sig>

More information about the libvir-list mailing list