nbdd0121 / nbdd0121/wsld

Yet another permission denied

Open
#26 0 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

Dominant language
Rust
Stars
305
Forks
29
PR merge metrics
No merged PRs in 30d

Description

Recently wsld started failing on one of my machines with an obscure permission denied message. After fumbling with it for a while, I figured out that this is an issue of not being able to remove /tmp/.X11-unix/X0, and sudo-removing it made things good again.

Two things are relevant here:

  1. I think that this has started recently because I did a new ubuntu setup -- and it now starts wslg as part of the setup, which means that you're left with a root-owned directory.
  2. It would therefore be nice to revise the code a bit and say what exactly caused the error rather than a vague "permission denied" -- it would at least save me a couple of hours trying to run in random directions.

I think that the offending code is

https://github.com/nbdd0121/wsld/blob/c2247984e58de386a52e7f937f98a0d0712e627a/client/src/x11socket.rs#L66-L67

which looks like it's ignoring the prospect of not being able to write that, and fails in a generic way rather that just telling you what went wrong.

(This is probably a duplicate of a few other issues, and adding an error would mean not spending time telling people about removing the files :)

Contributor guide

No contributing guide indexed for this repository

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Start in client/src/x11socket.rs at lines 66-67, where the issue identifies the failure. Reproduce the X11 socket cleanup failure involving /tmp/.X11-unix/X0 and inspect how the error is surfaced. Done means the failure explains the specific operation or path instead of only reporting a generic permission-denied message.

Written by the indexing model from the issue text.

Assessment

Tech stack
rust
Domain
operating-systems
Issue type
Bug
Difficulty
2/5
Estimated time
1-3 hours
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
35/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.