1

I know this question has been asked before, but I cannot find a solution for Ubuntu 18.04

I have an external hard drive (FAT32) that had a default name with spaces that was making my life hell for scripting. So I manually changed the mount point to /media/$user/Ext1TB but now I do not have write access to the disk and cannot save or modify the content. It used to work fine.

Things I have tried:

sudo chown -R $USER:$USER path/to/folder
gksu nautilus (doesn't work on 18.04?)
sudo chmod -R 777 /<folder name or path>

changing permissions through sudo nautilus (works but does not stay like that)

So I am a bit out of ideas. Any other suggestion that doesn't involve formatting?

I have already looked at the following posts:

Edit:
Thanks to guiverc I now understand the problem with FAT32 permissions. I have tried the following with no result:

sudo mount /dev/sda1 /media/$USER/Ext1TB

should I add the -w? The help says it is implicit. Can somebody help with the mount call?

From what I understand of the post suggested to make it permanent I have to add or modify a line in fstab similar to this:

UUID=8C52-C1CD /home/storage auto   user,umask=000,utf8,auto  0   0

But I have no idea on how to build the line, find the correct UUID number and set the correct options. Any suggestion with that?

Zanna
  • 70,465
ciskoh
  • 13
  • 1
    FAT32 partitions don't include space to store posix/unix/linux file permission bits (+r +w +x etc) as it has different bits (/hid /sys /ro /arc) so the chmod cannot work. Your 'fix' is to mount (ie. mount with permissions you want; the new directory has different permissions to where you mounted it previously) – guiverc Apr 26 '19 at 11:51
  • @guiverc Indeed your suggestion seems fitting but it didn't work for me. please see the edit for details – ciskoh Apr 26 '19 at 12:57
  • should be sudo mount /dev/sda1 /media/$USER/Ext1TB -o umask=000 – tatsu Apr 26 '19 at 13:03

1 Answers1

0

To mount your drive you must use the argument -o umask=000 this will mount the whole drive as write. since it is a FAT32 formatted drive this is how user rights work on it : they are set at mount so :

sudo mount /dev/sda1 /media/$USER/Ext1TB -o umask=000

will solve your issue.

tatsu
  • 3,107
  • the solution proposed works. Could you tell me how to make it permanent? – ciskoh Apr 26 '19 at 17:43
  • 1
    you could use DISKS, it's an installed app on your system. simply open it up, navigate to the partition you want to mount, turn off automounting (the default it no mount for a usb drive) and set the mount point and mount arguments like above or anything else that suits your needs – tatsu Apr 26 '19 at 20:41