3 ms·
> Where are the WSL files and the docker volumes inside it ? In WSL1 files are stored in a protected folder of %LocalAppData%. It's protected because using Win
by WorldMaker 7y ago
> Where are the WSL files and the docker volumes inside it ?
In WSL1 files are stored in a protected folder of %LocalAppData%. It's protected because using Windows and regular NTFS-expecting tools has a bad tendency to mess up Linux ACL metadatda. More recent versions of WSL1 added a Plan9-based file server that shows up as a pseudo-device in Windows under a UNC path \\wsl$
In WSL2 the files are stored in a VHD-like file (VM hard drive) and the Plan9-based file server is always available in every version of WSL2 (under \\wsl$ still) and additionally used in both directions (/mnt/c/ is no longer a direct NTFS mount on the Linux side, but now uses the file server, because WSL2 is more VM-like in every facet).
- johnchristopher 7y agoI see, so basically I can't do this in WSL1 /usr/bin/bindfs --force-user=johnchristopher --force-group=johnchristopher --create-for-user=www-data --create-for-group=www-data /home/johnchristopher/.docker-data/volumes/web/_data /home/johnchristopher/Dev/Web So that I can write code without messing up permissions (and map xdebug path to ~/Dev/Web) ? But it could be done in WSL2 (keeping permissions intact in the volume while being able to edit them outside) ?
- WorldMaker 7y agoI think that should work fine in WSL1. You just need to know that inside the WSL file system /home is not Windows %Home% (C:\Users\ or localized equivalent) and you want to use the \\wsl$ path for working with /home from Windows applications. The easiest way to tell if your WSL1 version is setup to provide \\wsl$ paths is to try `explorer.exe .` in the console in the directory you want the \\wsl$ path to. If it opens somewhere random in %System32% or %LocalAppData% then it doesn't support it (request an upgrade from your IT Admin).
- johnchristopher 7y agoThanks, I'll be trying that as soon as I can.