Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[BUG] permission denied accessing '/tmp/playwright-transform-cache' #21859

Closed
BrentBaccala opened this issue Mar 22, 2023 · 3 comments · Fixed by #22046
Closed

[BUG] permission denied accessing '/tmp/playwright-transform-cache' #21859

BrentBaccala opened this issue Mar 22, 2023 · 3 comments · Fixed by #22046
Assignees
Labels

Comments

@BrentBaccala
Copy link

System info

  • Playwright Version: 1.28.1
  • Operating System: Ubuntu 20
  • Browser: All
  • Other info:

Steps

  • Run playwright on a system where multiple users have been using it

Actual

Running 651 tests using 2 workers

Error: EACCES: permission denied, open '/tmp/playwright-transform-cache/3f/connectionFailurespec_3fcb2d59d7f1ac9abe23f187eeeed5065482bbfa.map'

  651 skipped
  1 error was not a part of any test, see above for details

The permissions on /tmp/playwright-transform-cache:

drwxrwxrwx 162 BrentBaccala BrentBaccala 4096 Mar 21 23:28 /tmp/playwright-transform-cache/

BrentBaccala is one of the users on the system. Permissions on some subdirectories:

drwxrwxrwx 2 BrentBaccala    BrentBaccala    4096 Feb 21 12:04 3e
drwxr-xr-x 2 MaximKhlobystov MaximKhlobystov 4096 Mar  1 13:44 3f
drwxrwxrwx 2 BrentBaccala    BrentBaccala    4096 Feb 21 12:04 42

MaximKhlobystov is also a user on the system, and I'm running this test (that's trying to access 3f) as user baccala, so obviously there's a problem.

It looks like Maxim is also running Playwright 1.28.1.

What explanation is there for how this directory 3f was created with these restrictive permissions? It surely happened on a previous playwright run, and I really don't know what the exact test configuration was that caused this. The directory is dated March 1, and today is March 21, so reproducing exactly what caused this might be problematic (if it isn't obvious to somebody).

@aslushnikov
Copy link
Contributor

@BrentBaccala I skimmed through the code, and by default, Playwright creates all cache folders with drwxrwxrwx permissions.

Any chance you can come up with a repro for this situation? Maybe docker might help to reproduce this in isolation?

@mxschmitt
Copy link
Member

I can repro.

  1. create two users
  2. one project
  3. npx playwright test with user1 in project
  4. modify test file and do n px playwright test with user2 in the same project
  5. observe error

@BrentBaccala
Copy link
Author

@mxschmitt, thank you! (perhaps I should have tried that)

It wasn't as hard to reproduce as I had feared.

aslushnikov added a commit to aslushnikov/playwright that referenced this issue Mar 24, 2023
@aslushnikov aslushnikov self-assigned this Mar 27, 2023
aslushnikov added a commit to aslushnikov/playwright that referenced this issue Mar 29, 2023
aslushnikov added a commit that referenced this issue Mar 29, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
3 participants