Local OS Version: may be only a MacOs Permission issue, not necessarily confined to intel or m1/m2 mac
Remote OS Version: Ubuntu 22.04
Remote Extension/Connection Type: Docker
Steps to Reproduce
Student has cloned repository into the /home/user/Documents/repos directory. Everything looks reasonable until when opening up the workspace in the dev container. In the dev container, cannot see any files in the file explorer. If open up a terminal and try and do a
$ ls -alh assg00-assg-name
Permission denied
You will get permission denied errors, and even changing to root does not help, the directory appears not to be mounted correctly to be seen inside of the container.
Description
We have not confirmed, but MacOs does set permissions on certain directories in the host OS with specific restrictions. I believe the Documents directory all MacOS users has some permissions like this. It may be that any repository cloned in this directory, can be used on the host system, but permissions are not correct to mount this in the Docker remote DevContainer? This cause is just speculation, needs to be confirmed.
Fix
For the first student who seemed to have this issue, simply creating a repos directory in their /home/username home directory seems to resolve the issue. If the above description is correct, this directory has permissions that are fine for Docker to be able to mount it in the container by default.
Steps to Reproduce
Student has cloned repository into the /home/user/Documents/repos directory. Everything looks reasonable until when opening up the workspace in the dev container. In the dev container, cannot see any files in the file explorer. If open up a terminal and try and do a
You will get permission denied errors, and even changing to root does not help, the directory appears not to be mounted correctly to be seen inside of the container.
Description
We have not confirmed, but MacOs does set permissions on certain directories in the host OS with specific restrictions. I believe the Documents directory all MacOS users has some permissions like this. It may be that any repository cloned in this directory, can be used on the host system, but permissions are not correct to mount this in the Docker remote DevContainer? This cause is just speculation, needs to be confirmed.
Fix
For the first student who seemed to have this issue, simply creating a repos directory in their /home/username home directory seems to resolve the issue. If the above description is correct, this directory has permissions that are fine for Docker to be able to mount it in the container by default.