-
Notifications
You must be signed in to change notification settings - Fork 854
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
mkdir /run/user/1000/: permission denied
after WSL 2.0.0
#10498
Comments
Do you have systemd enabled? |
mkdir /run/user/1000/: permission denied
after WSL 2.0.0 and wsl --manage Ubuntu --set-sparse true
mkdir /run/user/1000/: permission denied
after WSL 2.0.0
Yes, I forgot to mention that. |
Just to mention, this issue happened again out of the blue after booting up my WSL today. I suspect it's perhaps to the automatic disk sparsing. Previously I tested |
I have the same issue. The workaround for me is to remove systemd in /etc/wsl.conf Also setting the permission works with something like "chmod 700 $XDG_RUNTIME_DIR" but this doesn't persist in new sessions after closing the current session |
@felipecrs: Can you share the output of /logs |
Hello! Could you please provide more logs to help us better diagnose your issue? To collect WSL logs, download and execute collect-wsl-logs.ps1 in an administrative powershell prompt:
The scipt will output the path of the log file once done. Once completed please upload the output files to this Github issue. Click here for more info on logging Thank you! |
Will do, as soon as I can reproduce the issue again. As mentioned, it seems to happen randomly after fixing the permissions manually. Rebooting WSL or Windows does not immediately trigger the issue, apparently. |
I was really not able to reproduce this issue today. Yesterday it happened multiple times. @luis-aranda if you are still experiencing this, please share the logs as @OneBlue asked if you don't mind. |
After upgrading to 2.0.1 I was able to reproduce this issue again. I'm working to capture the logs. |
After |
Ok, issue happened again while WSL was even running. A restart isn't required to trigger the issue apparently. ❯ chezmoi cd
chezmoi: mkdir /run/user/1000/: permission denied
❯ ls -la /run/user/1000
ls: cannot access '/run/user/1000': No such file or directory
❯ sudo ls -la /run/user
total 0
drwxr-xr-x 2 root root 40 Sep 25 20:30 .
drwxr-xr-x 29 root root 780 Sep 25 20:29 .. |
Also have been getting asimilar error, |
I gotta say that after unregistering my WSL instance and starting from scratch I'm no longer having this issue. In the meantime I had also upgraded to 2.0.1, so maybe it also fixed it. |
FYI: i see also a similar issue: since quite a while, after starting wsl i initially get the "normal" /usr/user/1000 for default user but then fairly quickly something removes the whole directory with all files. A 'ssh localhost' does recreate them and from then on all the files stay as expected (to the extent i have to stay logged in via ssh, as soon as i log out the files get quickly removed). And yes, i also have systemd enabled (and currently run it with wsl 2.0.4.0 ...) |
An update on my side: I deleted my whole distro ( |
FYI: realized only now that this is a duplicate of #10496 and #10552. Disabling |
add this start up script to your .profile |
@dan788 this worked for me. Thanks alot. Do you have a brief explanation what it does? |
@appselskapet See here. |
I have this error too. $ lsb_release -a
No LSB modules are available.
Distributor ID: Ubuntu
Description: Ubuntu 24.04.1 LTS
Release: 24.04
Codename: noble
$ emacs .
(emacs:3234): dconf-CRITICAL **: 13:12:43.450: unable to create directory '/run/user/1000/dconf': Permission denied. dconf will not work properly.
(emacs:3234): dconf-CRITICAL **: 13:12:43.451: unable to create directory '/run/user/1000/dconf': Permission denied. dconf will not work properly.
(emacs:3234): dconf-CRITICAL **: 13:12:43.451: unable to create directory '/run/user/1000/dconf': Permission denied. dconf will not work properly.
(emacs:3234): dconf-CRITICAL **: 13:12:43.452: unable to create directory '/run/user/1000/dconf': Permission denied. dconf will not work properly.
(emacs:3234): dconf-CRITICAL **: 13:12:43.452: unable to create directory '/run/user/1000/dconf': Permission denied. dconf will not work properly.
(emacs:3234): dconf-CRITICAL **: 13:12:43.453: unable to create directory '/run/user/1000/dconf': Permission denied. dconf will not work properly.
(emacs:3234): dconf-CRITICAL **: 13:12:43.454: unable to create directory '/run/user/1000/dconf': Permission denied. dconf will not work properly.
(emacs:3234): dconf-CRITICAL **: 13:12:43.454: unable to create directory '/run/user/1000/dconf': Permission denied. dconf will not work properly. |
Same here. |
Hi, I follow your guide. But my ubuntu session start with this error
How to get it to work? I came here from this error in my Ubuntu, sudo -H apt upgrade, sadly upgrade also my GUI apps with sudo, even tho i already install pcmanfm-qt using just apt install
|
Windows Version
Microsoft Windows [Version 10.0.22631.2338]
WSL Version
2.0.0.0
Are you using WSL 1 or WSL 2?
Kernel Version
5.15.123.1-1
Distro Version
Ubuntu 22.04
Other Software
No response
Repro Steps
I'm sorry but I'm not sure if this issue happened after upgrading to 2.0.0 or after running
wsl --manage Ubuntu --set-sparse true
, since I did both at once.Some programs I have, like chezmoi, is now failing:
Expected Behavior
To work as it did before.
Actual Behavior
Diagnostic Logs
No logs.
The workaround is to:
sudo mkdir /run/user/1000 && sudo chmod 700 /run/user/1000 && sudo chown $(whoami): /run/user/1000
Which I saw somewhere but I don't remember where.
The text was updated successfully, but these errors were encountered: