0

I imported a WSL instance to keep my development environment close to that of my co-workers.

Unfortunately, the owner and group of folders like /mnt/c are of the person who created that wsl instance. this means I cannot even cd into it.

sudo chown, sudo chgrp and even sudo chmod all fail on this folder with 'permission denied'.

tyler.shellberg@04-GT81BM2:/mnt$ ls -al
total 16
drwxr-xr-x  6 root         root         4096 Jan 25 08:44 .
drwxr-xr-x 19 root         root         4096 Jan 26 08:30 ..
drwxrwx---  1 not.me       not.me       4096 Jan 25 13:38 c

What can I do to fix this?

1 Answers1

0

I had to edit /etc/wsl.conf so that the uid and gid matched my id, which I got with id. Then I had to shut down wsl with wsl --shutdown from a windows terminal and restart it.