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
- On a Linux server with multiple user accounts, install
@playwright/cli locally for two different users
- As user A, run:
npx playwright-cli open https://example.com — this succeeds and creates /tmp/playwright-cli/ owned by user A
- 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
Multi-user environments: EACCES on shared /tmp/playwright-cli directory
Description
When multiple OS users run
playwright-clion the same server, the first user to run it creates/tmp/playwright-cli/withdrwxrwxr-x(775) permissions owned by that user. Subsequent users get a permission error when they try to create their session subdirectory inside it:Steps to reproduce
@playwright/clilocally for two different usersnpx playwright-cli open https://example.com— this succeeds and creates/tmp/playwright-cli/owned by user Anpx playwright-cli open https://example.com— this fails withEACCESExpected behaviour
Each user should be able to run
playwright-cliindependently without permission conflicts. The shared/tmp/playwright-cli/directory should either:1777permissions (world-writable with sticky bit, matching/tmpitself), or/tmp/playwright-cli-$UID/or$XDG_RUNTIME_DIR/playwright-cli/Environment
@playwright/cli: latestWorkaround
As root:
chmod 1777 /tmp/playwright-cli