You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
We use playwright to serve PDF files in an ASP.NET Web Application (currently .NET 4.8 with IIS but soon .NET core with IIS).
For security reasons all files of the Web Application are on a separate drive at P:\Projects\ProjectName\Website. On that drive Users have no access, just the App-Pool user can access files of the appropriate Project itself. This way all applications are isolated from each other. There were security bulletins in the last years highly recommending that approach.
In that setup Playwright fails, because node can't open files in P:\Projects\ProjectName\.playwright\, unless the App-Pool user has Read-Permission on both P:\ and P:\Projects. Otherwise it throws PlaywrightException: Process exited (details below). But this breaks the security aspects of isolating each application completely.
It's probably an issue of node which can't handle permissions just granted on a deeper level than on the root of a drive. Probably it's not on the top priorities of node to ever fix that.
Suggestion:
It would be valuable if the location of the .playwright directory could be specified in this case. Currently the .playwright directory must always be in the Application's directory. If it could be at a custom location, security can be configured as needed for node.
This is related to #2241 but affects both .NET 4.8 and ASP.NET Core. I could imagine that other projects will also benefit, if that .playwright directory could be in a custom path, for various reasons. #2241 would already solve that need.
Exception details (captured in transport.LogReceived):
node:internal/fs/utils:345
throw err;
^
Error: EPERM: operation not permitted, lstat 'P:\'
at Object.realpathSync (node:fs:2461:5)
at toRealPath (node:internal/modules/cjs/loader:394:13)
at Function.Module._findPath (node:internal/modules/cjs/loader:550:22)
at resolveMainPath (node:internal/modules/run_main:19:25)
at Function.executeUserEntryPoint [as runMain] (node:internal/modules/run_main:71:24)
at node:internal/main/run_main_module:17:47 {
errno: -4048,
syscall: 'lstat',
code: 'EPERM',
path: 'P:\\'
}
The text was updated successfully, but these errors were encountered:
I'd like to see a custom driver path option as well. I have several dotnet automation projects that can reside on a PC and the current location requires a .playwright folder to be located under the project folder of each project on a PC. A custom location would allow a .playwright folder to have a central location for multiple apps rather than installing the same folder on the same PC in multiple locations.
We use playwright to serve PDF files in an ASP.NET Web Application (currently .NET 4.8 with IIS but soon .NET core with IIS).
For security reasons all files of the Web Application are on a separate drive at
P:\Projects\ProjectName\Website
. On that driveUsers
have no access, just the App-Pool user can access files of the appropriate Project itself. This way all applications are isolated from each other. There were security bulletins in the last years highly recommending that approach.In that setup Playwright fails, because node can't open files in
P:\Projects\ProjectName\.playwright\
, unless the App-Pool user has Read-Permission on bothP:\
andP:\Projects
. Otherwise it throwsPlaywrightException: Process exited
(details below). But this breaks the security aspects of isolating each application completely.It's probably an issue of node which can't handle permissions just granted on a deeper level than on the root of a drive. Probably it's not on the top priorities of node to ever fix that.
Suggestion:
It would be valuable if the location of the
.playwright
directory could be specified in this case. Currently the.playwright
directory must always be in the Application's directory. If it could be at a custom location, security can be configured as needed for node.This is related to #2241 but affects both .NET 4.8 and ASP.NET Core. I could imagine that other projects will also benefit, if that
.playwright
directory could be in a custom path, for various reasons. #2241 would already solve that need.Exception details (captured in
transport.LogReceived
):The text was updated successfully, but these errors were encountered: