set uncloud group on the unix socket to allow configured non-root users to access it

This commit is contained in:
Pavel Sviderski
2024-09-10 16:13:20 +10:00
parent 9e44d30328
commit ddf7d23351
6 changed files with 59 additions and 28 deletions
+5 -1
View File
@@ -57,7 +57,11 @@ func (c *SSHConnector) Connect(ctx context.Context) (*grpc.ClientConn, error) {
addr = strings.TrimPrefix(addr, "unix://")
conn, dErr := c.client.DialContext(ctx, "unix", addr)
if dErr != nil {
return nil, fmt.Errorf("connect to machine API socket %s through SSH tunnel: %w", addr, dErr)
return nil, fmt.Errorf(
"connect to machine API socket %s through SSH tunnel (is the Uncloud daemon running "+
"on the remote machine and does the SSH user have permissions to access the socket?): %w",
addr, dErr,
)
}
return conn, nil
},