[Date Prev][Date Next] [Thread Prev][Thread Next] [Date Index] [Thread Index]

Re: How to mount vfat filesystem read/write?



On 10/06/25 at 18:11, Chris Green wrote:
I have an SD card which is vfat formatted.  There's a file on it that
I want to remove but when automounted it is read only. How can I get
it to mount with write permission?

This is on debian 12.


Probably is already mounted read/write but you haven't write permission on it. First unmount the device, probably mounted by your Desktop Environment then unplug the device.
Then open a terminal, plug again the device and run these commands:

$ sudo dmesg | tail

at the end there is a line like this:

[48572.459241]  sde: sde1
[48572.459457] sd 7:0:0:0: [sde] Attached SCSI removable disk

"sde1" is the device name of the device I plugged on my system, in your system surely is different.
Now that you know the name of the device you can mount it:

$ sudo umount /mnt
umount: /mnt: not mounted. # It' OK
$ sudo mount /dev/[DEVICE-NAME] -t vfat -o rw,user,uid=$(id -u) /mnt

Now go back to your DE, open your favorite file-manager and under /mnt directory you can remove the file. After made your changes don't forget to unmount the device before unplugging it:

$ sudo unmount /mnt

Cheers,
--
Franco Martelli


Reply to: