Cannot copy to USB - every USB stick is read only (16.04)

81,821

Solution 1

I found this info. Try this: How to fix read only USB pen drive in Ubuntu. I do not know why every USB stick would be read-only. Hope it helps anyway.

Solution 2

My head hurts a little from all this, but hey turned out to be this bug. It's a shame to see the community take such a setback from the dismissal of Unity, and while they start over the giants like Microsoft and OS continue to progress down the road.

killall nautilus

Worked for me.

Solution 3

This is how I fixed the permissions of my pen drive that 'suddenly' became readonly.

  1. Switch to super user with:
    sudo su -

  2. Find in which directory the USB drive has been mounted by running:
    df -Th

    You should get a list of drives and your USB drive should be listed as:
    /dev/sda1 fuseblk 15G 65M 15G 1% /media/someuser/myUsbDrive

  3. Change the permissions of your USB pen drive (located at /dev/sda1) with:
    find /dev/sda1 -type f -exec chmod 666 {} \;

    or with

    find /dev/sda1 -type f -exec chmod 644 {} \;

Now your drive should be writable.


If the above doesn't work then change the permissions of the directories to make them writable:

find /dev/sda1 -type d -exec chmod 755 {} \;

Solution 4

You should try formatting it with the Ext4 partition format. That should let Ubuntu at least read and write to the USB drive correctly.

Solution 5

For a FAT formatted drive the following should work.

Mounting this way in Ubuntu 18.10 is now deprecated, but still works. With a spot of luck your external drive will be mounted as the current user. Please note though that sdb1 may not be the name of your drive.

gvfs-mount -d /dev/sdb1
Share:
81,821

Related videos on Youtube

Mookey
Author by

Mookey

Linux newbie. Ubuntu 14.04 LTS.

Updated on September 18, 2022

Comments

  • Mookey
    Mookey over 1 year

    Every USB stick I plug in is read-only and I cannot copy files to it.

    Here's what I've tried so far.

    1. I've formatted each one to either FAT32 or NTFS, quick and detailed format in Disks and GParted.
    2. I've used GParted to format the stick and recreate the msdos partition table layout. The device mounts fine, but won't copy files
    3. I've tried using other USBs that already have files.
    4. I've tried to unmount, remount:
      sudo chmod 777 /media/USER/USB_LABEL and 
      sudo mount -o remount,rw '/media/gaj/Working'
      
    5. I've changed permissions on all my media.
    6. There are no panic messages when plugging in the USB:
      dmesg | grep -i panic
      
    7. These are the dmesg log messages after plugging in and trying to copy to USB (Kingston is the brand):
      [ 4596.836206] scsi 4:0:0:0: Direct-Access     Kingston DT 101 G2        PMAP PQ: 0 ANSI: 0 CCS
      [ 4596.836620] sd 4:0:0:0: Attached scsi generic sg2 type 0
      [ 4598.105667] sd 4:0:0:0: [sdb] 15646720 512-byte logical blocks: (8.01 GB/7.46 GiB)
      [ 4598.107900] sd 4:0:0:0: [sdb] Write Protect is off
      [ 4598.107903] sd 4:0:0:0: [sdb] Mode Sense: 23 00 00 00
      [ 4598.110120] sd 4:0:0:0: [sdb] No Caching mode page found
      [ 4598.110123] sd 4:0:0:0: [sdb] Assuming drive cache: write through
      [ 4598.140729]  sdb: sdb1
      [ 4598.146626] sd 4:0:0:0: [sdb] Attached SCSI removable disk
      [ 4598.372004] FAT-fs (sdb1): Volume was not properly unmounted. Some data may be corrupt. Please run fsck.
      
    8. I run fsck on my USB device /dev/sdb1, which finds some "dirt" and fixes it, but again nothing changes.

    Can anyone help me before I smash my computer into pieces and move to Fedora?

  • Mookey
    Mookey over 7 years
    Thanks, I got it fixed and this link will serve as future reference for potential USB issues. I'm accepting it.
  • codeaviator
    codeaviator almost 7 years
    @Mookey link is broken :'(
  • wayofthefuture
    wayofthefuture over 6 years
    Doesn't work. I'll just get used to throwing usb keys in the trash. Ubuntu = perfect paradox. Startup disk creator doesn't work with 100% reliability, so use Etcher instead which creates tons of partitions, then comes Ubuntu block size 512 error in gparted if you want to format it, so you have to dd if=/dev/zero... the usb drive, recreate, then permissions are broke, can't write. Linux distros are suffering from a segmentation problem that is unfortunately BAD news for Linux as a whole. Sorry but the switch to Linux has been very sad.
  • bfz
    bfz over 6 years
    Nice! This worked for me too.
  • dmcquiggin
    dmcquiggin over 6 years
    @codeaviator - try the Google web cache here: webcache.googleusercontent.com/…
  • Bravo2bad
    Bravo2bad over 6 years
    I experienced this issue few times with fresh installations.. that worked perfectly and should be the answer.
  • Prahlad Yeri
    Prahlad Yeri over 6 years
    Totally agree. These indefinite Unity "bugs" have reached a limit now, I'm switching to Ubuntu-MATE as early as possible.
  • bfz
    bfz over 6 years
    I found this solution just to find out that I already up-voted and commented on it before. Its a shame we're not getting any fix for this, especially since its what we have out of the box in 16.04 LTS.
  • Dan Dascalescu
    Dan Dascalescu over 5 years
    This is nuts. I'm sure there's a "technical" reason for this, but how a bug like this passed through QA and hasn't been fixed in over a year, is beyond me. I love Linux, but blatant issues like this, you just don't see on Windows.
  • Bernd Wechner
    Bernd Wechner over 4 years
    Didn't work for me. No instance or nautilus (or nemo) running (killed them) and mounted it with sudo mount /dev/sdg /media/DOS and it reports mount: /media/DOS: WARNING: device write-protected, mounted read-only.
  • Bernd Wechner
    Bernd Wechner over 4 years
    Link worked for me, but the method did not. dosfsck found nothing to fix and my USB flash drive is still mounted read only no matter what I try.