Skip to content

Conversation

@stefanhaller
Copy link
Collaborator

@stefanhaller stefanhaller commented Aug 5, 2025

In 3a9dbf7 we created a global /tmp/lazygit/ folder that contains the temp directories of each running instance, to avoid polluting /tmp with multiple folders. The problem with that approach was that the folder was created with 700 permissions, so if multiple users were using lazygit on the same machine (e.g. a server), all users except the first one would get fatal errors on startup.

Fix this by creating temp folders containing the user's uid.

Fixes #4793.

@stefanhaller stefanhaller added the bug Something isn't working label Aug 5, 2025
@codacy-production
Copy link

codacy-production bot commented Aug 5, 2025

Coverage summary from Codacy

See diff coverage on Codacy

Coverage variation Diff coverage
Report missing for bcb95bd1 69.23%
Coverage variation details
Coverable lines Covered lines Coverage
Common ancestor commit (bcb95bd) Report Missing Report Missing Report Missing
Head commit (71813fd) 57213 49720 86.90%

Coverage variation is the difference between the coverage for the head and common ancestor commits of the pull request branch: <coverage of head commit> - <coverage of common ancestor commit>

Diff coverage details
Coverable lines Covered lines Diff coverage
Pull request (#4796) 13 9 69.23%

Diff coverage is the percentage of lines that are covered by tests out of the coverable lines that the pull request added or modified: <covered lines added or modified>/<coverable lines added or modified> * 100%

See your quality gate settings    Change summary preferences

Footnotes

  1. Codacy didn't receive coverage data for the commit, or there was an error processing the received data. Check your integration for errors and validate that your coverage setup is correct.

…-user machines

In 3a9dbf7 we created a global /tmp/lazygit/ folder that contains the temp
directories of each running instance, to avoid polluting /tmp with multiple
folders. The problem with that approach was that the folder was created with 700
permissions, so if multiple users were using lazygit on the same machine (e.g. a
server), all users except the first one would get fatal errors on startup.

Fix this by creating temp folders containing the user's uid.
@stefanhaller stefanhaller merged commit 525edfb into master Aug 6, 2025
13 checks passed
@stefanhaller stefanhaller deleted the fix-temp-dir branch August 6, 2025 07:48
tmeijn pushed a commit to tmeijn/dotfiles that referenced this pull request Aug 7, 2025
This MR contains the following updates:

| Package | Update | Change |
|---|---|---|
| [jesseduffield/lazygit](https://github.com/jesseduffield/lazygit) | patch | `v0.54.0` -> `v0.54.1` |

MR created with the help of [el-capitano/tools/renovate-bot](https://gitlab.com/el-capitano/tools/renovate-bot).

**Proposed changes to behavior should be submitted there as MRs.**

---

### Release Notes

<details>
<summary>jesseduffield/lazygit (jesseduffield/lazygit)</summary>

### [`v0.54.1`](https://github.com/jesseduffield/lazygit/releases/tag/v0.54.1)

[Compare Source](jesseduffield/lazygit@v0.54.0...v0.54.1)

<!-- Release notes generated using configuration in .github/release.yml at v0.54.1 -->

This hotfix release fixes a regression in 0.54.0 that made lazygit fail on startup when multiple users use it on a single machine.

For the changes in 0.54.0, see https://github.com/jesseduffield/lazygit/releases/tag/v0.54.0.

#### What's Changed

##### Fixes 🔧

- Fix temp dir permission problem on multi-user machines by [@&#8203;stefanhaller](https://github.com/stefanhaller) in jesseduffield/lazygit#4796

##### Maintenance ⚙️

- Stop updating Jesse's homebrew tap by [@&#8203;stefanhaller](https://github.com/stefanhaller) in jesseduffield/lazygit#4797

##### Docs 📖

- Update Fedora section of the README.md file by [@&#8203;dejlek](https://github.com/dejlek) in jesseduffield/lazygit#4792

#### New Contributors

- [@&#8203;dejlek](https://github.com/dejlek) made their first contribution in jesseduffield/lazygit#4792

**Full Changelog**: jesseduffield/lazygit@v0.54.0...v0.54.1

</details>

---

### Configuration

📅 **Schedule**: Branch creation - At any time (no schedule defined), Automerge - At any time (no schedule defined).

🚦 **Automerge**: Enabled.

♻ **Rebasing**: Whenever MR is behind base branch, or you tick the rebase/retry checkbox.

🔕 **Ignore**: Close this MR and you won't be reminded about this update again.

---

 - [ ] <!-- rebase-check -->If you want to rebase/retry this MR, check this box

---

This MR has been generated by [Renovate Bot](https://github.com/renovatebot/renovate).
<!--renovate-debug:eyJjcmVhdGVkSW5WZXIiOiI0MS41My4xIiwidXBkYXRlZEluVmVyIjoiNDEuNTMuMSIsInRhcmdldEJyYW5jaCI6Im1haW4iLCJsYWJlbHMiOlsiUmVub3ZhdGUgQm90Il19-->
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

bug Something isn't working

Projects

None yet

Development

Successfully merging this pull request may close these issues.

/tmp/lazygit precludes use by multiple users

2 participants