# /nix/var/nix/daemon-socket/socket: Permission denied

**URL:** https://discourse.nixos.org/t/nix-var-nix-daemon-socket-socket-permission-denied/39142
**Category:** Help
**Created:** [February 1, 2024, 3:56pm UTC](https://discourse.nixos.org/t/nix-var-nix-daemon-socket-socket-permission-denied/39142 "2024-02-01T15:56:40Z")
**Posts on this page:** 4
**Page:** 1

<div class="post-metadata">

### Author: ![ulysses4ever](https://discourse.nixos.org/user_avatar/discourse.nixos.org/ulysses4ever/32/3198_2.png) [@ulysses4ever](https://discourse.nixos.org/u/ulysses4ever)
#### Post date: [February 1, 2024, 3:56pm UTC](https://discourse.nixos.org/t/nix-var-nix-daemon-socket-socket-permission-denied/39142/1 "2024-02-01T15:56:40Z")

</div>

Hey! At my university, we just convinced systems to install Nix on one server that my group uses. Unfortunately, the installation seems defunct, as we’re getting this:

```auto
~$ nix-shell -p hello --run hello
error: getting status of /nix/var/nix/daemon-socket/socket: Permission denied

```

Google turns up a number of bug reportrs around `/nix/var/nix/daemon-socket/socket` but none looks exactly like what we have (`Permission denied`).

The server is administered by them (we don’t have `sudo`), so debugging it a bit annoying, but I’m open to any suggestions because we’re completely lost. Thanks!

---

<div class="post-metadata">

### Author: ![abathur](https://discourse.nixos.org/user_avatar/discourse.nixos.org/abathur/32/2719_2.png) [@abathur](https://discourse.nixos.org/u/abathur)
#### Post date: [February 1, 2024, 4:37pm UTC](https://discourse.nixos.org/t/nix-var-nix-daemon-socket-socket-permission-denied/39142/2 "2024-02-01T16:37:13Z")

</div>

> [@ulysses4ever](#):
>
> `/nix/var/nix/daemon-socket/socket: Permission denied`

Do you know what linux this is, and how they installed it? I see a number of threads out there mentioning this when people have installed Nix with their system package manager. Looks like quite a few threads are about Alpine.

The Nix manual discusses the mechanism they’re probably using: [Multi-User Mode - Nix Reference Manual](https://nixos.org/manual/nix/unstable/installation/multi-user.html?highlight=%22nix-users%22#restricting-access)

If this sounds right, your user or users likely need to be added to the `nix-users` group.

---

<div class="post-metadata">

### Author: ![ulysses4ever](https://discourse.nixos.org/user_avatar/discourse.nixos.org/ulysses4ever/32/3198_2.png) [@ulysses4ever](https://discourse.nixos.org/u/ulysses4ever)
#### Post date: [February 1, 2024, 5:05pm UTC](https://discourse.nixos.org/t/nix-var-nix-daemon-socket-socket-permission-denied/39142/3 "2024-02-01T17:05:39Z")

</div>

Thanks! This was our guess too because the socket belongs to that group. We’re on getting them to add us to that group.

The distro is Ubuntu. I hope their way of doing things won’t bring other surprises. But I’m not very hopeful because piping to `sh` is a so much more tried method that I’d expect it to be orders of magnitude more reliable…

(I’ll mark this as solved once our admins add us to the group and we can check that it works…)

---

<div class="post-metadata">

### Author: ![ulysses4ever](https://discourse.nixos.org/user_avatar/discourse.nixos.org/ulysses4ever/32/3198_2.png) [@ulysses4ever](https://discourse.nixos.org/u/ulysses4ever)
#### Post date: [February 8, 2024, 3:29pm UTC](https://discourse.nixos.org/t/nix-var-nix-daemon-socket-socket-permission-denied/39142/4 "2024-02-08T15:29:12Z")

</div>

It did help, thank you again!
