Read-only USB

Questions about hardware,drivers and peripherals
Forum rules
Before you post please read how to get help
Post Reply
Ctulhu
Level 2
Level 2
Posts: 79
Joined: Mon May 02, 2011 5:45 pm

Read-only USB

Post by Ctulhu »

Hi all

On Mint 18.2 64bit, I am running into a problem again that apparently has been discussed for a long time but nothing I find only works for me: formatting a USB-stick with FAT 32 and then not being able to write onto it because "the destination is read-only" - is there a real fix for that? I have tried everything that the Disks app has to offer and nothing works, I refuse to believe that in 2017 we can't plug&play a normal USB stick in Linux (which is what made me move to Linux back when in the day)! Any hints?

Thanks for your time
User avatar
Flemur
Level 18
Level 18
Posts: 8863
Joined: Mon Aug 20, 2012 9:41 pm
Location: Potemkin Village

Re: Read-only USB

Post by Flemur »

Ctulhu wrote:Hformatting a USB-stick with FAT 32 and then not being able to write onto it because "the destination is read-only" - is there a real fix for that?
I use a fat32 16G USB stick w/o problems. IIRC, I left it formatted the way I bought it.

All the files on it look like....
$ ls -al

Code: Select all

drwxr-xr-x 2 username username     16384 Dec 31  1969 .
drwxr-x--- 3 username username      4096 Oct  1 11:13 ..
-rw-r--r-- 1 username username 162760908 Sep 30 18:42 file-name
Have you tried

Code: Select all

cd /to/the/stick
ls -al 
# ^^^ post back what you get from that 'ls'
sudo chown username:username .
sudo chmod +w .
touch aa
The "." = the current directory.
"touch aa" = create an empty file named "aa" (unless it already exists, then just change the file's date...)
If can "touch aa" as your regular user and not get an error, you can write to it.
EDIT: "username" = YOUR USER NAME

How about

Code: Select all

cd /to/the/stick
sudo touch aa
ls -l aa
sudo chown username:username aa
sudo chmod +w aa
ls -l aa
rm aa
Hint: I've heard bad things about "Disks" (tho I've never used it), you might try gparted instead.
Please edit your original post title to include [SOLVED] if/when it is solved!
Your data and OS are backed up....right?
Ctulhu
Level 2
Level 2
Posts: 79
Joined: Mon May 02, 2011 5:45 pm

<SOLVED> Read-only USB

Post by Ctulhu »

I was able to apply this

cd /to/the/stick
ls -al
# ^^^ post back what you get from that 'ls'
sudo chown username:username .
sudo chmod +w .
touch aa

to the stick when formatted as ext4 and then refomat it into ntfs with gparted - that did the trick, thanks so much!
Mute Ant
Level 14
Level 14
Posts: 5129
Joined: Tue Sep 03, 2013 7:45 pm
Location: Norfolk UK

Re: Read-only USB

Post by Mute Ant »

A working USB stick can't be made read-only using software, it's the file system or the mount that's doing that. A store that appears to have an ISO9660 file system will be mounted read-only. Even if it has been reformatted, the 'parted' programs write to the minimum number of blocks needed to do the job and fail to erase an ISO9660 signature. If it's ext4, you are fighting with who owns the file system, as well.
Always Works
o Make a blank-file-system image head -c 32M /dev/zero > filler.img
o Use Mint's USB Image Writer to write the filler.img file to the store.
o Use Mint's USB Formatter to format the drive.
While you're waiting, read the free novel we sent you. It's a Spanish story about a guy named "manual".
Post Reply

Return to “Hardware Support”