Skip to content

set private per-user tmpdir - #11401

Open
moss4u wants to merge 1 commit into
omacom:quattrofrom
moss4u:user-tmpdir
Open

set private per-user tmpdir#11401
moss4u wants to merge 1 commit into
omacom:quattrofrom
moss4u:user-tmpdir

Conversation

@moss4u

@moss4u moss4u commented Sep 12, 2026

Copy link
Copy Markdown

Summary

Configure omarchy to use a private per-user temporary directory at ~/.local/tmp via $TMPDIR.

This avoids using the shared 1777 /tmp namespace for applications that respect $TMPDIR, while preserving /tmp for compatibility.

Implementation

  • creates ~/.local/tmp
  • sets TMPDIR=${HOME}/.local/tmp for systemd user sessions
  • sets the equivalent PAM environment value for contexts such as ssh
  • adds a user tmpfiles policy to clean files older than 10 days
  • enables the user systemd-tmpfiles-clean.timer
  • adds migration support for existing installations
  • users and user-tools are encouraged to use TMPDIR

The corresponding omarchy-settings change adds .local/tmp to /etc/skel for newly created users.

Rationale

The main benefit is removing compliant applications from the globally writable /tmp namespace, reducing exposure to classes of temporary-file bugs involving shared namespaces, predictable paths, symlink attacks, and related races.

MacOS has also taken similar steps using /var/folders/...

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant