Pkg.jl
Pkg.jl copied to clipboard
Use WSL style NTFS extended attributes to store permissions of extracted artifacts on Windows
The idea would be to follow https://docs.microsoft.com/en-us/windows/wsl/file-permissions#wsl-metadata-on-windows-files to store unix file permissions instead of changing ACLs of extracted files on Windows. The functions to interact with these extended attributes are https://docs.microsoft.com/en-us/windows-hardware/drivers/ddi/ntifs/nf-ntifs-zwqueryeafile and https://docs.microsoft.com/en-us/windows-hardware/drivers/ddi/ntifs/nf-ntifs-zwseteafile.
@staticfloat, @StefanKarpinski, giordano had a brief chat about this on Slack, and I'm just opening this issue to keep a record of the links we dug out.
Okay, had a talk with @vtjnash about this, and we're on board with trying this out.
The concrete steps forward are:
- [ ] Write the EA utility functions in libuv to read/write WSL2 permissions strings, use those in
uv_fs__chmod()
anduv_fs__stat()
instead of the ACL code. - [ ] Create Julia branch that uses that libuv code, so
chmod()
andstat()
use EAs instead of ACLs - [ ] See if our
access(X_OK)
code can detect whether~/.julia
inherits an executable permission, and if it does not, surface a warning to the user that they may need to do something likeicacls .julia /grant ${USER}:(OI)(CI)F /T
.