Page 1 of 1

Read-only USB

Posted: Sun Oct 01, 2017 1:11 pm
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

Re: Read-only USB

Posted: Sun Oct 01, 2017 1:25 pm
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.

<SOLVED> Read-only USB

Posted: Sun Oct 01, 2017 2:51 pm
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!

Re: Read-only USB

Posted: Sun Oct 01, 2017 8:48 pm
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.