Error permission denied untitled ipynb

Hi, I am getting an error while creating an jupyter notebook on ubuntu. I am getting follwing error. OSError: [Errno 13] Permission denied: '/home/ubuntu/.local/share/jupyter' [W 11:37:05.3...

Please find the below traceback.

[I 12:12:13.472 NotebookApp] Creating new notebook in
[E 12:12:13.475 NotebookApp] Error while saving file: Untitled.ipynb [Errno 13] Permission denied: ‘/home/ubuntu/.local/share/jupyter’
Traceback (most recent call last):
File «/home/ubuntu/anaconda2/lib/python2.7/site-packages/notebook/services/contents/filemanager.py», line 421, in save
self.check_and_sign(nb, path)
File «/home/ubuntu/anaconda2/lib/python2.7/site-packages/notebook/services/contents/manager.py», line 439, in check_and_sign
if self.notary.check_cells(nb):
File «/home/ubuntu/anaconda2/lib/python2.7/site-packages/traitlets/traitlets.py», line 556, in get
return self.get(obj, cls)
File «/home/ubuntu/anaconda2/lib/python2.7/site-packages/traitlets/traitlets.py», line 535, in get
value = self._validate(obj, dynamic_default())
File «/home/ubuntu/anaconda2/lib/python2.7/site-packages/notebook/services/contents/manager.py», line 58, in _notary_default
return sign.NotebookNotary(parent=self)
File «/home/ubuntu/anaconda2/lib/python2.7/site-packages/nbformat/sign.py», line 392, in init
self.store = self.store_factory()
File «/home/ubuntu/anaconda2/lib/python2.7/site-packages/nbformat/sign.py», line 340, in factory
return SQLiteSignatureStore(self.db_file)
File «/home/ubuntu/anaconda2/lib/python2.7/site-packages/traitlets/traitlets.py», line 556, in get
return self.get(obj, cls)
File «/home/ubuntu/anaconda2/lib/python2.7/site-packages/traitlets/traitlets.py», line 535, in get
value = self._validate(obj, dynamic_default())
File «/home/ubuntu/anaconda2/lib/python2.7/site-packages/nbformat/sign.py», line 351, in _db_file_default
if not self.data_dir:
File «/home/ubuntu/anaconda2/lib/python2.7/site-packages/traitlets/traitlets.py», line 556, in get
return self.get(obj, cls)
File «/home/ubuntu/anaconda2/lib/python2.7/site-packages/traitlets/traitlets.py», line 535, in get
value = self._validate(obj, dynamic_default())
File «/home/ubuntu/anaconda2/lib/python2.7/site-packages/nbformat/sign.py», line 328, in _data_dir_default
return app.data_dir
File «/home/ubuntu/anaconda2/lib/python2.7/site-packages/traitlets/traitlets.py», line 556, in get
return self.get(obj, cls)
File «/home/ubuntu/anaconda2/lib/python2.7/site-packages/traitlets/traitlets.py», line 535, in get
value = self._validate(obj, dynamic_default())
File «/home/ubuntu/anaconda2/lib/python2.7/site-packages/jupyter_core/application.py», line 93, in _data_dir_default
ensure_dir_exists(d, mode=0o700)
File «/home/ubuntu/anaconda2/lib/python2.7/site-packages/ipython_genutils/path.py», line 167, in ensure_dir_exists
os.makedirs(path, mode=mode)
File «/home/ubuntu/anaconda2/lib/python2.7/os.py», line 157, in makedirs
mkdir(name, mode)
OSError: [Errno 13] Permission denied: ‘/home/ubuntu/.local/share/jupyter’
[W 12:12:13.477 NotebookApp] Unexpected error while saving file: Untitled.ipynb [Errno 13] Permission denied: ‘/home/ubuntu/.local/share/jupyter’
[E 12:12:13.478 NotebookApp] {
«Content-Length»: «19»,
«Accept-Language»: «en-US,en;q=0.5»,
«Accept-Encoding»: «gzip, deflate, br»,
«X-Xsrftoken»: «2|327d203c|041fe57cf5370b97a158a8b03bbaad7e|1506427435»,
«X-Requested-With»: «XMLHttpRequest»,
«Host»: «52.25.207.37:8888»,
«Accept»: «application/json, text/javascript, /; q=0.01″,
«User-Agent»: «Mozilla/5.0 (Windows NT 6.1; Win64; x64; rv:56.0) Gecko/20100101 Firefox/56.0»,
«Connection»: «keep-alive»,
«Referer»: «https://52.25.207.37:8888/tree»,
«Cookie»: «_xsrf=2|327d203c|041fe57cf5370b97a158a8b03bbaad7e|1506427435; username-52-25-207-37-8888=»2|1:0|10:1507723927|26:username-52-25-207-37-8888|44:Y2ZlZDQ2NzgwZjQ1NGEyYjk1MjQxMTY5YmZjMTg2Mzg=|9347d6a8265f0d6ad3911623592096197f434b559706c355433d3ae21e45b595″»,
«Content-Type»: «application/json»
}
[E 12:12:13.478 NotebookApp] 500 POST /api/contents (115.114.191.92) 6.16ms referer=https://52.25.207.37:8888/tree

Click New Python file and a pop-up window will pop up to show permission denied: untitled.ipynb

See permission denied trying to solve the permission problem. All kinds of Baidu results are 777 operations on the file, as follows:

sudo chmod 777 ~/.local/share/jupyter/
cd ~/.local/share/jupyter/
ls
sudo chmod 777 runtime/
cd runtime/

Note that the jupyter directory here is the path under share under. Local, not the share/jupyter under your own installation path. There is no runtime folder under the jupyter directory structure under your own installation path

However, after performing Chmod 777 operation and restarting jupyter notebook, it is found that the creation of python3 file is still unable, and it still indicates that the permission is insufficient

Solution: modify the working path of jupyter

The insufficient permissions of all our prompts should be due to the insufficient permissions of the files in our jupyter workspace, which makes it impossible to create new files in the directory

So we can modify the working path of jupyter and control the permissions

CD enter the bin directory under the anaconda installation directory and execute the command to view the path of the configuration file

[[email protected] bin]$ ./jupyter notebook --generate-config
Writing default config to: /home/virtual/.jupyter/jupyter_notebook_config.py

Open the configuration file jupyter_ notebook_ config.py

## The directory to use for notebooks and kernels.
#c.NotebookApp.notebook_ Direct = '

change it to
?The directory to use for notebooks and kernels.
c.notebookapp.notebook_ Dir = '~/workspace/jupyter'

where ~/workspace/jupyter is my workspace, you can change it to your own existing file path

(the folder must be created in advance. If it is not created, jupyter notebook will not be able to find the file and will flash back.)

(#c.NotebookApp.notebook_ The ᦇ in front of indicates that the comment must be deleted, and no spaces can be left before it.)

PS. in Linux VI, enter/and then enter the keywords to search for full-text search keywords. For example, you can/notebook here_ Dir to locate where to modify

After modification, save and restart jupyter nootbook

Similar Posts:

Be The First To Get Support Updates

Want to know about the latest technical content and software updates?

Error Message

Various ArcGIS modules can be used with the Jupyter Notebook application installed with ArcGIS Pro, and a folder location is automatically created to store the notebooks. However, the following error message is returned when creating a new notebook using the default location created in the C drive of the machine.

Error:   
Creating Notebook Failed
An error occurred while creating a new notebook. Permission denied: <notebook_name>.ipynb

Error message

Cause

The following are possible causes:

  • The read or write permissions of the default folder located in the C drive of the machine is restricted.
  • An error occurred during the ArcGIS Pro or ArcGIS Python Package Manager installation.

Solution or Workaround

If the read or write permissions of the default folder is restricted, either start Jupyter Notebook in a different folder, or request the admin to create a new Python environment clone for non-admin users.

Start the Jupyter Notebook in a different folder

In the Python Command Prompt, replace the file path with a different folder containing the appropriate read or write permissions.

  1. Open the Python Command Prompt. Type the following code to change the folder location to the desired folder, and press Enter.
cd [folder location] 

Different folder

  1. Type jupyter notebook in the Python Command Prompt to launch Jupyter Notebook on the machine, and press Enter.
jupyter notebook

Python Command Prompt

Request the admin of the machine to create a new Python environment clone for non-admin users

Non-admin users do not have the required permissions to clone a Python environment, only admins can do this. Refer to How To: Clone a Python environment with the Python Command Prompt for detailed steps.

If the error occurred during an installation of ArcGIS Pro or ArcGIS Python Package Manager, follow the steps described below to resolve the issue.

  1. Open Windows File Explorer and, navigate to ‘C:Program FilesArcGISProbinPython’.
  2. Rename the Python folder and repair the ArcGIS Pro application. Refer to Microsoft: Repair apps and programs for more information.
Note:
Installation of ArcGIS Pro includes the installation of ArcGIS Python Package Manager. If the ArcGIS Python Package Manager is not installed during the ArcGIS Pro installation, manually install the package manager. Refer to ArcGIS API for Python: Install using ArcGIS Pro Python Package Manager for detailed steps.

Related Information

  • ArcGIS Pro: Python Package Manager
  • ArcGIS API for Python: Using the Jupyter Notebook environment
  • How To: Troubleshoot installation and uninstallation issues
  • ArcGIS Blog: Three Ways to Get Jupyter Notebooks and the ArcGIS API for Python

Last Published: 12/1/2019

Article ID: 000021819

Software: ArcGIS Pro 2.4.2, 2.4.1, 2.4, 2.3.3, 2.3.2, 2.3.1, 2.3, 2.2.4, 2.2.3, 2.2.2, 2.2.1, 2.2, 2.1.3, 2.1.2, 2.1.1, 2.1, 2.0.1, 2.0, 1.4.1, 1.4, 1.3.1, 1.3, 1.2

Понравилась статья? Поделить с друзьями:
  • Error permission denied errno 13 permission denied
  • Error page you have encountered an unexpected error please contact the system administrator for assistance
  • Error page text
  • Error page not found the requested url was not found on this server
  • Error page jsp