olzstage.blogg.se

Box drive access from windows subsystem for linux
Box drive access from windows subsystem for linux





box drive access from windows subsystem for linux

To map a drive to the Samba share, open PowerShell and issue following command: PS > NET USE M: centosmyshare. Note that that particular answer also has the chroot setup instructions. There is a better way to access the share by mapping a drive to Samba share in Windows. It's been a while since I tried it out, but I had it working for this answer for a different purpose. and the user shouldn't be able to escape it. However, you can launch WSL directly into this jail with something like: wsl -u root -e sh -c "cd /newroot exec /usr/sbin/chroot /newroot/" su - username Ultimately I do believe you'll have to create a chroot jail. WSL2 support for Box Drives Robert Butler 2 years ago I am trying to utilize a Windows Subsystem for Linux (WSL2) terminal on my PC for linux. However, even with automounting turned off, if I recall correctly, the Windows drives can still be manually mounted since that functionality is provided by the WSL /init. That at least prevents the root user from being able "restart" the WSL instance. That said, I'd definitely start with a /etc/wsl.conf that includes: ĭisabling interop will be important for preventing a root user from calling the wsl.exe command from inside WSL. in the WSL distro console window, and press Enter. The mechanism for disabling automounting and interop is through the /etc/wsl.conf file, but, of course someone with root access to the WSL instance can still edit that and undo your changes. Open the WSL distro (ex: 'Ubuntu') you want, and make sure your current folder is your Linux home directory. WSL really is designed for Windows/Linux interop.

box drive access from windows subsystem for linux

Completely turning off the ability for root to get access to the Windowsĭrives might be a bit tough.







Box drive access from windows subsystem for linux