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

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.