UNABLE TO COPY FILE TO FLASH DRIVE – READ-ONLY FILE SYSTEM

You connect a pendrive, you want to copy something to it and a window appears that you can’t, because it is mounted only in read-only mode. You might think that the problem lies in the wrong installation of the USB stick and simply removing and inserting it will definitely help, but the fault is the USB flash drive structure itself, which is fortunately easy to fix.

Fixing a read-only error on a USB stick

To start with, you need to find out in which directory the flash drive has been mounted

In the terminal enter:

df -Th

You should get something like this:

Filesystem Type Size Used Avail Use% Mounted on
udev devtmpfs 1,5G 4,0K 1,5G 1% /dev
tmpfs tmpfs 301M 1,5M 300M 1% /run
none tmpfs 4,0K 0 4,0K 0% /sys/fs/cgroup
/dev/sda1 ext2 236M 50M 174M 23% /boot
/dev/sdc1 vfat 7,3G 3,1G 4,3G 42% /media/user/ABCDEF

In my example it will be /media/user/ABCDEF . This is shown by the size of yypie (usually something from FAT), size (e.g. if the pen drive has 8GB, it will have a little less space – for me 7.3GB) and the path to the directory where it is installed – starts with / media.
You also need What lies behind Filesystem – for me /dev/sdc1 .

Unmount the pen drive

In the terminal:

mount/media/user/ABCDEF

Of course, replace the directory path with the one you had.

Scan the pen drive for errors

In the terminal:

dosfsck -a /dev/sdc1

After completing this command, you can safely remove the pen drive and insert it again. It will work!