Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

All my ipython notebooks are suddenly read only. Running Ubuntu with windows dual boot

Tags:

ubuntu

jupyter

I have a windows and ubuntu dual boot system.

I experimented a little and this only happens to my notebooks which are in a /media directory. I have been working with jupyter notebooks in my /media directory with no problems before today.

Screenshot of a jupyter notebook

When I try to create a new Python 2 notebook, I get this error:

An error occurred while creating a new notebook.


Unexpected error while saving file: Untitled Folder/Untitled.ipynb [Errno 30] Read-only file system: '/media/james/OS/cygwin64/home/colleen/Untitled Folder/Untitled.ipynb'

How do I make it not read-only and everything back to normal?

like image 433
Gen Tan Avatar asked Dec 14 '25 23:12

Gen Tan


1 Answers

First try changing the mount options to enable your user have to write access:

sudo mount -o remount,rw /dev/sda1 /media

(Replace /dev/sda1 with the correct partition for media.)

You can also put it in /etc/fstab.

Then, if needed, check if your user has write permissions for /media. If you don't, you can add it by doing:

chmod 644 /media

And to set all files 644 and folders to 755, see this answer.:

To change all the directories to 755 (drwxr-xr-x):

find /opt/lampp/htdocs -type d -exec chmod 755 {} \;

To change all the files to 644 (-rw-r--r--):

find /opt/lampp/htdocs -type f -exec chmod 644 {} \;
like image 106
aneroid Avatar answered Dec 16 '25 21:12

aneroid



Donate For Us

If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!