diff --git a/shared/cliconfig/remote.go b/shared/cliconfig/remote.go index 6b18ee0af4a..65116df8298 100644 --- a/shared/cliconfig/remote.go +++ b/shared/cliconfig/remote.go @@ -81,7 +81,14 @@ func (c *Config) GetInstanceServer(name string) (incus.InstanceServer, error) { var netErr *net.OpError if errors.As(err, &netErr) { - return nil, fmt.Errorf("The incus daemon doesn't appear to be started (socket path: %s)", netErr.Addr) + errMsg := netErr.Unwrap().Error() + if errMsg == "connect: connection refused" || errMsg == "connect: no such file or directory" { + return nil, fmt.Errorf("The incus daemon doesn't appear to be started (socket path: %s)", netErr.Addr) + } else if errMsg == "connect: permission denied" { + return nil, fmt.Errorf("You don't have the needed permissions to talk to the incus daemon (socket path: %s)", netErr.Addr) + } + + return nil, err } return nil, err