I have read quite a few tips and tricks here and there on this forum. However, I cannot find any clean way of solving this problem. I had an old 1.5tb drive that was in a e-SATA box that I plugged in my computer on my Ubuntu 16.04. Struggled a bit to get the partition on it, succeeded and now have mounted my drive on: /mnt/3b42e9ce-1972-498b-9b96-13199979c333
This is my setup:
sudo fdisk -l
Disk /dev/sda: 1.4 TiB, 1500301910016 bytes, 2930277168 sectors
Units: sectors of 1 * 512 = 512 bytes
Sector size (logical/physical): 512 bytes / 512 bytes
I/O size (minimum/optimal): 512 bytes / 512 bytes
Disklabel type: dos
Disk identifier: 0x06dd1f4e
Device Boot Start End Sectors Size Id Type
/dev/sda1 2048 2930276351 2930274304 1.4T 83 Linux
Disk /dev/sdb: 279.4 GiB, 300000000000 bytes, 585937500 sectors
Units: sectors of 1 * 512 = 512 bytes
Sector size (logical/physical): 512 bytes / 512 bytes
I/O size (minimum/optimal): 512 bytes / 512 bytes
Disklabel type: dos
Disk identifier: 0x129228a1
Device Boot Start End Sectors Size Id Type
/dev/sdb1 52 65675 65624 32M de Dell Utility
/dev/sdb2 * 67584 27645951 27578368 13.2G 7 HPFS/NTFS/exFAT
/dev/sdb4 27645952 585936895 558290944 266.2G 5 Extended
/dev/sdb5 27648000 35459071 7811072 3.7G 82 Linux swap / Solaris
/dev/sdb6 35461120 113584127 78123008 37.3G 83 Linux
/dev/sdb7 113586176 585936895 472350720 225.2G 83 Linux
so sda 1 is my problem. I have tried this trick:
sudo chgrp USER /mnt/3b42e9ce-1972-498b-9b96-13199979c333
sudo chmod g+w /mnt/3b42e9ce-1972-498b-9b96-13199979c333
But this is not solving my problem my softwares cannot write on the disk. Not sure if I can really execute something on it. And this does not last after reboot and remounting. I have this message:
sudo chgrp USER /mnt/3b42e9ce-1972-498b-9b96-13199979c333
chgrp: changing group of '/mnt/3b42e9ce-1972-498b-9b96-13199979c333': Read-only file system
I also have tried to remount with writing permission but this did not work at all.
sudo mount -o remount,rw /dev/sda1
or
sudo mount -o remount, uid=1000, gid=1000, rw /dev/sda1
The latest syntax is not understood by the system at all although you will find it in different forums. My software is in my home directory so should have the same rights as me.
What is most surprising me is that I lost the rights without having rebooted... While working on my software which was struggling since it could not write (I discovered lately the origin of the error)
Any help welcome
I usually mount all my non OS drives into /media. So you could mount your drive in /media/mydrive/ (change mydrive to anything you like).
Get the UUID of your drive
Make an entry in your fstab to mount your drive to /media/mydrive
Add the entry, something like this
Take ownership of the mount point
Reboot