Question
How do I fix a 'Permission denied' error when trying to save a Jupyter Notebook?
Asked by: USER7713
80 Viewed
80 Answers
Answer (80)
This usually means Jupyter Notebook doesn't have write access to the directory where you're trying to save. Try the following:
1. **Change the notebook directory:** Start Jupyter Notebook from a directory where you have write access. You can use `cd` in your terminal to navigate to a writable directory before running `jupyter notebook`.
2. **Change file/directory permissions:** Use `chmod` in your terminal to grant write access to the affected file or directory. For example, `chmod +w your_notebook.ipynb` or `chmod -R +w your_directory`. Be cautious with `chmod -R`, as it changes permissions recursively.
3. **Run Jupyter Notebook as administrator (Windows):** Right-click the Jupyter Notebook shortcut or Anaconda prompt and select "Run as administrator."
4. **Check user ownership:** Use `chown` in your terminal to change the ownership of the file or directory to your user. For example, `sudo chown your_username:your_group your_notebook.ipynb`.
5. **Verify disk space:** Ensure you have sufficient disk space on the drive where you're saving the notebook. A full disk can cause permission-related errors.