Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Error: Get http://unix.socket/1.0: dial unix /var/snap/lxd/common/lxd/unix.socket: connect: permission denied

Tags:

lxd

I am getting the following error while connecting to LXD:

Error: Get http://unix.socket/1.0: dial unix /var/snap/lxd/common/lxd/unix.socket: connect: permission denied

like image 765
Vishrant Avatar asked Jan 27 '23 19:01

Vishrant


1 Answers

You will have to execute the following command in order to provide access to the current (non-root) user:

sudo usermod -a -G lxd $(whoami)
newgrp lxd

Confirm it by executing

/snap/bin/lxc query --wait -X GET /1.0

You should get a JSON response.

like image 183
Vishrant Avatar answered May 31 '23 12:05

Vishrant