Skip to main content
December 18, 2022
Question

Running op under WSL with systemd turned on gives error message

  • December 18, 2022
  • 7 replies
  • 1407 views

Running op under WSL when having the new https://devblogs.microsoft.com/commandline/systemd-support-is-now-available-in-wsl/ will give the following error message:

❯ op whoami
couldn't start daemon: open /run/user/1000/op-daemon.pid: permission denied
Shorthand: my
URL: https://my.1password.com
<info removed>

I have XDG_RUNTIME_DIR=/run/user/1000/ in my environment and the uid of the running user is 1000.

Any idea if this message can be fixed? I tried just as a temp fix setting OP_CACHE=false but that still produces the message

EDIT: Specifically it's Debian 11 under WSL


1Password Version: Not Provided
Extension Version: Not Provided
OS Version: Not Provided
Browser:_ Not Provided

7 replies

Jack_P_1P
1Password Employee
December 22, 2022

Hi @thisdevdane:

Thanks for letting us know about this! I've filed an issue internally to see if we can sort this out.

Jack

ref: dev/b5/op#3299

December 28, 2022

Great to hear!

April 24, 2023

Hey @Jack_P_1P any updates on this? I got the same error using RockyLinux 8 under WSL.

Jack_P_1P
1Password Employee
April 24, 2023

Hi @oliverroos:

Nothing to share just yet, but I've added you to the issue I mentioned above.

Jack

1Password Employee
May 26, 2023

Hi @thisdevdane and @oliverroos ! This is usually an error that users who would run the cli on another machine would get because their user (who owns the cli process) would lack permissions to most files on the host filesystem. Since WSL uses a VM behind the scenes, could you double check that the process running the cli has permissions to access run/user/1000/op-daemon.pid?

May 29, 2023

So I had systemd turned on off on my wsl instance until now, I turned it on to test if I had access /run/user/1000/op-daemon.pid but first just quickly ran op whoami to see if it was still not working, well surprisingly no error is now showing up. So something was fixed either on 1Password's end or on Microsoft's end. Either way, it works now!

May 29, 2023

Perfect, we are happy to hear that! Thank you for letting us know!

Amanda