I am trying to run a jupyter notebook using data and notebooks that are mounted on an EBS volume on my ec2 instance. My ec2 instance uses ubuntu. My directory structure looks like the following:
/
---|mountedData
---|localData
I used the instructions provided here here to set up the notebook. When I invoke the jupyter notebook command from / or from /localData it is successful. However, I can't navigate to the /mountedData directory (it doesn't even show up on the browser's file navigation screen). If I launch the jupyter notebook from within /mountedData I get an error in the browser
Server error: Traceback (most recent call last): File "/snap/jupyter/6/lib/python3.7/site-packages/tornado/web.py", line 1699, in _execute result = await result File "/snap/jupyter/6/lib/python3.7/site-packages/tornado/gen.py", line 209, in wrapper yielded = next(result) File "/snap/jupyter/6/lib/python3.7/site-packages/notebook/services/contents/handlers.py", line 112, in get path=path, type=type, format=format, content=content, File "/snap/jupyter/6/lib/python3.7/site-packages/notebook/services/contents/filemanager.py", line 431, in get model = self._dir_model(path, content=content) File "/snap/jupyter/6/lib/python3.7/site-packages/notebook/services/contents/filemanager.py", line 313, in _dir_model for name in os.listdir(os_dir): PermissionError: [Errno 13] Permission denied: '/var/lib/snapd/void'`
All directories are owned by root and root is the usergroup. I even tried chmod 777'ing the /mountedData but that didn't help. I also tried symlinking the mounted data within /localData as I saw suggested online but that produces a 404 not found error when I try to click on the symlink. Unfortunately ditching the mounted data is not an option as I am working with TBs of data that I need to mount and attach to ec2 instances. Thanks for the help!