Skip to content

[Bug] cli: EACCES - permission denied on /tmp/playwright-cli/ in multi-user environments #39830

@lewisjenkins

Description

@lewisjenkins

Multi-user environments: EACCES on shared /tmp/playwright-cli directory

Description

When multiple OS users run playwright-cli on the same server, the first user to run it creates /tmp/playwright-cli/ with drwxrwxr-x (775) permissions owned by that user. Subsequent users get a permission error when they try to create their session subdirectory inside it:

EACCES: permission denied, mkdir '/tmp/playwright-cli/349375efe0a83407'

Steps to reproduce

  1. On a Linux server with multiple user accounts, install @playwright/cli locally for two different users
  2. As user A, run: npx playwright-cli open https://example.com — this succeeds and creates /tmp/playwright-cli/ owned by user A
  3. As user B, run: npx playwright-cli open https://example.com — this fails with EACCES

Expected behaviour

Each user should be able to run playwright-cli independently without permission conflicts. The shared /tmp/playwright-cli/ directory should either:

  • Be created with 1777 permissions (world-writable with sticky bit, matching /tmp itself), or
  • Use a user-specific path such as /tmp/playwright-cli-$UID/ or $XDG_RUNTIME_DIR/playwright-cli/

Environment

  • OS: Ubuntu 24 (headless server)
  • Node: 18+
  • @playwright/cli: latest
  • Non-root user accounts, no shared group

Workaround

As root: chmod 1777 /tmp/playwright-cli

Metadata

Metadata

Assignees

Labels

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions