0

I am running Ubuntu MATE 22.04 on a Chromebook. Due to the limited internal memory of a Chromebook, I am using a 128 GB USB drive for storage. This drive is formatted as exfat, so that it can be used in both Windows and GNU/Linux. I want to automount the disk, so that its permanent location would not change, and my Cloud Storage Client (Mega) would be able to access it witout manual intervention.

I opened Mount options for this Drive in GNOME Disks, and enabled Mount at Startup.

After doing this, I cannot edit files in the drive. The drive is mounted as /mnt/MyDrive.

I tried sudo chown -R myusername:myusername /mnt/MyDrive, but it did not work (despite using sudo, it says "Operation not permitted").

I tried logging as root with su and chown -R myusername:myusername /mnt/Files, but still it says "Operation not permitted").

How do I fix this? I want to automount the drive, but also want to have read-write access.


Note: If I don't automount the drive, I have full read-write access in it (without sudo). In the past, I have automounted ext4 drives, and I could chown it with sudo without an issue. This issue is specific to exfat (and maybe NTFS as well).

Archisman Panigrahi
  • 28,338
  • 18
  • 105
  • 212

1 Answers1

0

This answer is partly based on this answer, which is about manual, normal mounting (but not automounting) of NTFS/exfat drives.


  1. Open the file /etc/fstab as root.
sudo nano /etc/fstab
  1. Comment out the line corresponding to your particular drive (the label of my drive is MyDrive), and add the line
/dev/disk/by-label/MyDrive /mnt/MyDrive auto rw,user,uid=1000,dmask=007,fmask=117,nosuid,nodev,nofail,x-gvfs-show 0 0
  1. Reboot.

Note: The label of my USB drive is MyDrive. You will have to change accordingly. You can also mount using the UUID instead of the label. See the Ubuntu Community Help page of fstab for more details.

Archisman Panigrahi
  • 28,338
  • 18
  • 105
  • 212