# Can we make sudo work or extend user access?

**URL:** <https://community.firebasestudio.dev/t/can-we-make-sudo-work-or-extend-user-access/144>\
**Category:** General\
**Created:** [May 18, 2024, 8:24am UTC](https://community.firebasestudio.dev/t/can-we-make-sudo-work-or-extend-user-access/144 "2024-05-18T08:24:43Z")\
**Posts on this page:** 8\
**Page:** 1

<div class="post-metadata">

**Author:** ![DRKolev](https://sea2.discourse-cdn.com/flex002/user_avatar/community.firebasestudio.dev/drkolev/32/99_2.png) [@DRKolev](https://community.firebasestudio.dev/u/DRKolev)\
**Post date:** [May 18, 2024, 8:24am UTC](https://community.firebasestudio.dev/t/can-we-make-sudo-work-or-extend-user-access/144/1 "2024-05-18T08:24:43Z")

</div>

Any chance we can have sudo work?

sudo: /etc/sudo.conf is owned by uid 65534, should be 0  
sudo: /usr/bin/sudo must be owned by uid 0 and have the setuid bit set

I am able to compile repos from source but some of them require to write to specific locations. For example neovim even if compiled to a non-default location (which does not require sudo normally) would try to write to man which our normal user does not have access to (maybe oversight?).

---

<div class="post-metadata">

**Author:** ![nathfavour](https://sea2.discourse-cdn.com/flex002/user_avatar/community.firebasestudio.dev/nathfavour/32/209_2.png) [@nathfavour](https://community.firebasestudio.dev/u/nathfavour)\
**Post date:** [May 23, 2024, 5:14am UTC](https://community.firebasestudio.dev/t/can-we-make-sudo-work-or-extend-user-access/144/2 "2024-05-23T05:14:09Z")

</div>

same problem here… I can’t use docker

---

<div class="post-metadata">

**Author:** ![willdhan](https://sea2.discourse-cdn.com/flex002/user_avatar/community.firebasestudio.dev/willdhan/32/228_2.png) [@willdhan](https://community.firebasestudio.dev/u/willdhan)\
**Post date:** [May 24, 2024, 9:20am UTC](https://community.firebasestudio.dev/t/can-we-make-sudo-work-or-extend-user-access/144/3 "2024-05-24T09:20:49Z")

</div>

yes please +1​​​​​​​​

---

<div class="post-metadata">

**Author:** ![Gartz](https://sea2.discourse-cdn.com/flex002/user_avatar/community.firebasestudio.dev/gartz/32/235_2.png) [@Gartz](https://community.firebasestudio.dev/u/Gartz)\
**Post date:** [May 24, 2024, 2:59pm UTC](https://community.firebasestudio.dev/t/can-we-make-sudo-work-or-extend-user-access/144/4 "2024-05-24T14:59:22Z")

</div>

Have you tried enabling Docker in the dev.nix file, then create a Debian container where you have root access?

That should allow you to compile anything supported by the platform.

---

<div class="post-metadata">

**Author:** ![Vova](https://sea2.discourse-cdn.com/flex002/user_avatar/community.firebasestudio.dev/vova/32/12_2.png) [@Vova](https://community.firebasestudio.dev/u/Vova)\
**Post date:** [May 24, 2024, 3:32pm UTC](https://community.firebasestudio.dev/t/can-we-make-sudo-work-or-extend-user-access/144/5 "2024-05-24T15:32:53Z")

</div>

@DRKolev Unfortunately currently `sudo` won’t help you write to directories outside of /home as most of them are mounted as read-only into the IDX environment. We may relax that in the future, but it’s not currently planned

To help me understand your use-case better, what are you trying to achieve with building neovim from source? Are you working on neovim itself inside IDX or do you want to use neovim in IDX(which you can do by adding `pkgs.neovim` to your `dev.nix` file)?

---

<div class="post-metadata">

**Author:** ![Vova](https://sea2.discourse-cdn.com/flex002/user_avatar/community.firebasestudio.dev/vova/32/12_2.png) [@Vova](https://community.firebasestudio.dev/u/Vova)\
**Post date:** [May 24, 2024, 3:35pm UTC](https://community.firebasestudio.dev/t/can-we-make-sudo-work-or-extend-user-access/144/6 "2024-05-24T15:35:55Z")

</div>

@nathfavour As @Gartz mentioned above, we have support for docker out of the box, it just needs to be enabled by adding the following line into your `dev.nix`:

```nix
{ pkgs, ... }: {
  # ...
  services.docker.enable = true;
}

```

After this you can use `docker run` etc.

---

<div class="post-metadata">

**Author:** ![DRKolev](https://sea2.discourse-cdn.com/flex002/user_avatar/community.firebasestudio.dev/drkolev/32/99_2.png) [@DRKolev](https://community.firebasestudio.dev/u/DRKolev)\
**Post date:** [June 8, 2024, 8:29am UTC](https://community.firebasestudio.dev/t/can-we-make-sudo-work-or-extend-user-access/144/7 "2024-06-08T08:29:41Z")

</div>

@Vova Hey. Sorry, I missed your question.

I was building it from source to see if I could replicate my usual work setup using nvim nightly. The rest I was able to achieve by hiding the UI of VSCode and leaving only its prompt with nvim open. Is there a reason for the restrictions?

---

<div class="post-metadata">

**Author:** ![Chad\_Nygard](https://sea2.discourse-cdn.com/flex002/user_avatar/community.firebasestudio.dev/chad_nygard/32/3816_2.png) [@Chad\_Nygard](https://community.firebasestudio.dev/u/Chad_Nygard)\
**Post date:** [March 2, 2025, 3:32pm UTC](https://community.firebasestudio.dev/t/can-we-make-sudo-work-or-extend-user-access/144/8 "2025-03-02T15:32:04Z")

</div>

[quote=“Vova, post:6, topic:144, full:true”]  
@nathfavour As @Gartz mentioned above, we have support for docker out of the box, it just needs to be enabled by adding the following line into your `dev.nix`:

```auto
{ pkgs, ... }: {
  # ...
  services.docker.enable = true;
}

```

I am doing a Minikube project. ----!

"Project IDX has a critical `sudo` permission issue: `/etc/sudo.conf` and `/usr/bin/sudo` are incorrectly owned (UID 65534 instead of 0). This breaks `sudo`, significantly impacting Docker.

- **Likely Works (Limited):**
  - `docker build` (for simple images without extensive privileged operations).
  - Pushing images to registries.
  - Deploying to Cloud Run (as execution is offloaded).

- **Likely Fails:**
  - `docker run` (especially with network or privileged operations).
  - Docker Compose.
  - Any Docker commands requiring `sudo` (most advanced features).
  - Minikube.

This blocks tasks requiring elevated privileges. Please fix the base container image to restore proper `sudo` permissions."
