-
Notifications
You must be signed in to change notification settings - Fork 5.4k
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
Using fs on a network drive requires more permissions on Windows than Mac, and it's unclear what the extra permission is. #24703
Comments
I think the issue is with the permissions of the sheared folder on Windows. For example, if the permissions are denied, |
Hi @yazan-abdalrahman , in OP, |
@yazan-abdalrahman You have an excellent remark but I think something weird is happening that needs to be discussed. Windows Permissions tab works at the OS/filesystem level. That means if the file has Denay all permissions then it's not possible to read/write to that file because OS won't allow reading/writing from it (for any user process in the system). What I mean by that the behaviour should be consistent (the same) regardless of the programming language/platform. Recently I made some quick trivial scripts (I can share the sources if you like) using Python and Ruby and it's possible to read/write any file I like without any issue. Why does the Deno runtime require |
I pushed this PR #25132 to fix it and it was fixed but it's still needs confirm they thinks on windows it's needs all permission to access network files for security reasons so I told my opinion on PR comments and still needs confirm or what should I do |
@yazan-abdalrahman I looked at the PR and I think I should put more context into that issue because the described issue is fully reproducible on my machine. If I understand the PR correctly it changes the way how Deno validates the UNC paths on Windows. IMHO the problem might be deeper than that.
So based on the above it might be only the UNC path validation issue, but to me, it doesn't necessarily have to be only there. |
@KarolBajkowski |
Version: Deno 1.45.3
I have a NAS, say the server name is
MY_NAS
, and it shares a folderfoo
over SMB.On mac, to visit
foo
in Finder, I should press ⌘K and inputsmb://MY_NAS/foo
. To visit in CLI, I need to use the path/Volumes/foo
.On Windows,
\\MY_NAS\foo
can be used in both File Explorer and CLI.The problem is when I want to operate on it using fs with deno, the permission required seems to differ on Windows and Mac.
deno run -A test.ts
will succeed on both Windows and Mac.deno run --allow-write test.ts
will fail on Windows, succeed on Mac.deno run test.ts
will ask for--allow-write
, pressingy
will fail on Windows, succeed on Mac.Error message on Windows:
The text was updated successfully, but these errors were encountered: