# Permission Denied When Using the BoxGrinder libvirt Plugin

Found this little nugget of wisdom over on the BoxGrinder community
forums
.

If you get the following error when running boxgrinder-build with
the libvirt delivery plugin:

Errno::EACCES: Permission denied - /var/lib/libvirt/images

The answer is to set the SUDO_USER environment variable to
root. While boxgrinder-build will run with elevated privileges by
default, it drops those privileges after running the operating system
plugin and creating the disk image. Running the following command will
ensure the process uses elevated privileges for the entire build and
deployment process.

Doing this will allow BoxGrinder to copy the image file to the image
directory and register the new virtual machine with the hypervisor.