Recently starting a new environment in WSL2. I am able to create environments in the WSL2 file system, but when I switch to a mounted drive it fails.
addohm@addohm-lap:~$ cd ~
addohm@addohm-lap:~$ python3 -m venv env
addohm@addohm-lap:~$ ls
env onedrive
addohm@addohm-lap:~$ cd onedrive
addohm@addohm-lap:~/onedrive$ cd _code_projects/python_projects/nwfb/
addohm@addohm-lap:~/onedrive/_code_projects/python_projects/nwfb$ python3 -m venv env
Error: Command '['/mnt/d/OneDrive/_code_projects/python_projects/nwfb/env/bin/python3', '-Im', 'ensurepip', '--upgrade', '--default-pip']' returned non-zero exit status 1.
addohm@addohm-lap:~/onedrive/_code_projects/python_projects/nwfb$ ls
README.md env main.py multi.py templates test2.py
assets gui.py multi-DESKTOP-18V5EK2.py requirements.txt test.py
addohm@addohm-lap:~/onedrive/_code_projects/python_projects/nwfb$ source env/bin/activate
-bash: env/bin/activate: No such file or directory
addohm@addohm-lap:~/onedrive/_code_projects/python_projects/nwfb$
It seems the contents of the mounted drives are all owned by root:root.
drwxrwxrwx 1 root root 4096 Nov 26 12:16 nwfb
Since I am not exactly familiar with the interactions between WSL2 and the windows file system, is it safe to modify all the ownership of my onedrive folder contents? Will I have to repeatedly change ownership for new files added to the drive?
Edit:
Small test, left side is ownership modified, right side is not. Changing ownership seems insignificant. Since /mnt/ contains all mounted drives on the system, I wonder if I should change ownership of the entire drive chown -R addohm:addohm /mnt/d
Edit 2: after changing ownership of files on external drives, the ownership doesn't actually change.
addohm@addohm-lap:~/onedrive/_code_projects/python_projects/nwfb$ sudo chown -R addohm:addohm main.py
addohm@addohm-lap:~/onedrive/_code_projects/python_projects/nwfb$ ls -al
-rwxrwxrwx 1 root root 7169 Nov 21 09:58 main.py