keybase / client

Keybase Go Library, Client, Service, OS X, iOS, Android, Electron
BSD 3-Clause "New" or "Revised" License
8.85k stars 1.22k forks source link

Hardcoded Unix UID in config file #24603

Open fungs opened 2 years ago

fungs commented 2 years ago

After migrating home user data to a new installation, I saw that kbfs won't start because there are hardcoded paths in the config file (Linux) which refer to the numeric UID of the user. It is best practice that programs do not rely on that UID being static (see migration issue). Instead, the paths should be determined at run-time.

Specifically, in $HOME/.config/keybase/config.json, "mountdir": "/run/user/1000/keybase/kbfs" should be something like "mountdir": "/run/user/$UID/keybase/kbfs".

Keep on creating great software!

fungs commented 2 years ago

The dynamic path would be $XDG_RUNTIME_DIR on a modern Linux system, as mentioned in the docs https://book.keybase.io/docs/files/details#mountpoints.