Open jurab opened 1 month ago
do you have write permissions to $XDG_DATA_HOME?
we've just run into the same issue on v1.0.8
same issue here
We'll need help diagnosing under which conditions this happens, most likely something with the path and permissions mismatch.
The issue happens on a freshly installed macbook with a freshly installed nix (with the det installer).
As an initial workaround we tried to install cachix and then do cachix use devenv
. That command worked. After the devenv cachix was enabled, the error still happens.
We worked around the issue now by dropping a flake.nix in the project and then running devenv through flakes. This works without any permission issues.
Is there any commands we can run that would be helpful to better understand the problem?
I did not manage to replicate this in a fresh VM. Fresh install, devenv init
, devenv shell
, devenv up
, with and without cachix.enable
— no dice.
At the failure point, devenv tries to write to the following directory: ~/.local/share/devenv
We'd be grateful if someone could ls -l
this directory and share the permissions.
here's the ls of my ~/.local/share/devenv
.rw-r--r-- 77 root 6 Aug 13:52 cachix_trusted_keys.json
drwxr-xr-x - foo 6 Aug 12:36 devenv
drwxr-xr-x - foo 6 Aug 12:36 gc
do you have write permissions to $XDG_DATA_HOME?
yes, no permission issues there
.rw-r--r-- 77 root 6 Aug 13:52 cachix_trusted_keys.json
Oh, well, here's the problem. How did this end up being owned by root? Did you happen to run sudo devenv
at some point?
ah yes, changing the ownership solved the issue
I ran the non-mac installation first which ran into a permission issue, so I ran it with sudo, found out that's not the way either and then noticed there's a specific mac version, so I tried to remove everything and start over and apparently missed something
would be amazing to have an uninstall script, but thanks a lot for the assistance 👍
At the failure point, devenv tries to write to the following directory: ~/.local/share/devenv We'd be grateful if someone could ls -l this directory and share the permissions.
@mpscholten @zeydtc could you also check the permissions in this directory? Did you also run devenv with sudo at some point?
we did run devenv with sudo because we had a permission issue as well. however, unfortunately I can't recall if it was due to what @jurab said or if it was something else.
-rw-r--r--@ 1 root staff 77 Aug 14 14:53 cachix_trusted_keys.json
drwxr-xr-x 2 em staff 64 Aug 14 13:13 devenv
drwxr-xr-x 5 em staff 160 Aug 14 14:53 gc
Describe the bug
I'm getting permission issues macOS, the file ownerships seem to be correctly set
Version devenv 1.0.8 (aarch64-darwin)