0

I recently installed ubuntu on my labtop (I used windows before) and a the partition that had all my data and files previously on windows is now set to read only in linux , how can I change that ?

Kareem Kasem
  • 1
  • 1
  • 1
  • Do you get any messages wen mounting the partition? Or do dmesg or the logfile /var/log/messages say something about the partition just after mouting ? – Soren A Aug 11 '19 at 10:46
  • 3
    looks like the partition is locked by the Windows fast startup feature. if you have still a windows partiton with dual-boot, simply boot into Windows and shutdown it with shutdown /P – cmak.fr Aug 11 '19 at 11:24

1 Answers1

0

You may want to edit your /etc/fstab, so you can set the permissions you need on your partition and also have it automounted in a specified mount point. This mount point has to be created before editing /etc/fstab. Create it using

sudo mkdir <mount_point>
  • <mount_point> is usually a directory inside /media. I use /media/Data as my <mount_point>. You may want to use /media/OS (instead of Data and OS you can use any name you wish).

Then, you need to get your partition's UUID and type. To do that, run

sudo blkid

After determining which is your desired partition, edit /etc/fstab:

sudo nano /etc/fstab

At the end of the file add the following (since you were using Windows, I suppose that your partition's type is "ntfs"):

UUID=<your_partition's_UUID> <mount_point> ntfs-3g  defaults,nls=utf8,fmask=117,dmask=007,uid=1000,windows_names 0 0
  • <your_partition's_UUID> is the UUID you got from blkid.

  • <mount_point> is the mount point you created before.

  • ntfs-3g is your partition's file system type (I supposed ntfs; if it is of another type it must be specified accordingly)

  • the rest of the options set the permissions on the partition. The ones I used above give you permission to read and write to your partition and also remove the executable permission from all files of it.

Save your changes using Ctrl+O, close nano using Ctrl+X and restart your laptop for the changes to take effect.

The above settings work really well for me. However, if you need something different or you need more details about fstab, check this fstab wiki.

  • Your answer misses the most important point, already commented: https://askubuntu.com/questions/1164940/how-to-make-partition-read-and-write-instead-of-read-only#comment1941958_1164940 . Typically any NTFS partition is mounted RW without needing to edit fstab. –  Aug 11 '19 at 17:27
  • Yes, but as the question is stated, it is implied that the OP was using Windows in the past and that he has now replaced them with Ubuntu (OP's phrases: " (I used windows before)" and "previously on windows"). – BeastOfCaerbannog Aug 11 '19 at 17:34
  • Maybe you're right but in that case I doubt that explicitly mounting it will change anything, assuming the Fast Startup hasn't been disable before installing Ubuntu. I don't know because I actually disable it routinely in any dual-boot. –  Aug 11 '19 at 17:39
  • I'm not sure either since I also disable it. I suppose that the OP will enlighten us. – BeastOfCaerbannog Aug 11 '19 at 18:05
  • didn't work. still read only – Kareem Kasem Aug 13 '19 at 07:28
  • Do you have Windows installed on your computer or have you replaced them with Ubuntu? – BeastOfCaerbannog Aug 14 '19 at 14:34