I am struggling with the ungraded lab and permission to make a directory.
I am on a macOS Mojave 10.14.16, tried both Safari and Chrome. Tried trusted mode.
I know about cmod and chown but do not know what to change.
Edit: (And this is the case if I use Conda or Docker to run this lab)
hi @tmsaur , could you give more information about how you run the command?
if you use Docker, in which directory you run it ? Do you see any error in your Terminal ?
I run this command from the week1-ungraded-lab directory:
docker run -it --rm -p 8888:8888 -p 8000:8000 --mount type=bind,source=$(pwd),target=/home/jovyan/work deeplearningai/mlepc1w1-ugl:jupyternb
This is the terminal output from I start the notebook to I try to create the directory in step 3:
[I 10:21:26.052 NotebookApp] 302 GET /?token=54c7e6646b123bf20a74ba8d7fb0f56e80f58fea67ff95a5 (172.17.0.1) 1.380000ms
[I 10:21:30.630 NotebookApp] Writing notebook-signing key to /home/jovyan/.local/share/jupyter/notebook_secret
[W 10:21:30.634 NotebookApp] Notebook work/server.ipynb is not trusted
[W 10:21:30.693 NotebookApp] 404 GET /nbextensions/widgets/notebook/js/extension.js?v=20210513102115 (172.17.0.1) 12.220000ms referer=http://127.0.0.1:8888/notebooks/work/server.ipynb
[I 10:21:31.694 NotebookApp] Kernel started: 3cfebda1-73ce-4ff3-a217-373a3c74511e, name: python3
[W 10:21:31.699 NotebookApp] 403 GET /api/contents/work/server.ipynb/checkpoints?_=1620901290478 (172.17.0.1): Permission denied: work/.ipynb_checkpoints
[W 10:21:31.700 NotebookApp] Permission denied: work/.ipynb_checkpoints
[W 10:21:31.702 NotebookApp] 403 GET /api/contents/work/server.ipynb/checkpoints?_=1620901290478 (172.17.0.1) 42.110000ms referer=http://127.0.0.1:8888/notebooks/work/server.ipynb
Permissions:
ls -la
total 0
drwxr-xr-x 4 root staff 128 May 12 15:36 .
drwxr-xr-x 8 root staff 256 May 12 15:36 …
drwxr-xr-x 8 root staff 256 May 12 15:38 week1-ungraded-lab
drwxr-xr-x 3 root staff 96 May 12 15:36 week2-ungraded-lab
Inside the week1 dir:
ls -la
total 704
drwxr-xr-x 8 root staff 256 May 12 15:38 .
drwxr-xr-x 4 root staff 128 May 12 15:36 …
-rwxr-xr-x 1 root staff 8444 May 12 15:36 README.md
drwxr-xr-x 3 root staff 96 May 12 15:36 assets
-rwxr-xr-x 1 root staff 10327 May 12 15:36 client.ipynb
drwxr-xr-x 13 root staff 416 May 12 15:36 images
-rw-r–r-- 1 root staff 172 May 12 15:36 requirements.txt
-rwxr-xr-x 1 root staff 331345 May 12 15:36 server.ipynb
The owner setting in the current directory maybe the root cause of the error. Currently all the directory and file owned by root user. So when notebook try to create directory with normal user, permission error will occur. Could you try to change owner by running following command
sudo chown -R $(whoami):staff .
Then do ls
again to check if all the files and directory owner changes to your user.
Thank you. Running sudo chown -R $(whoami):staff . no the week1 dir was the solution. I think (?) this happened because I probably used sudo before the git pull command. And then the files was owned by the root user.
Hi @tranvinhcuong I am also getting this error but using sudo chown -R $(whoami):staff .
didn’t solve the issue. I am on ubuntu 20.04 and using Docker for this lab.