Open ghost opened 8 years ago
I did some more investigation and found a reasonably reliable way to reproduce this. You need a USB card reader and a formatted SD card.
It looks like Caja gets confused if the first time /dev/sdWhatever gets mounted, it is in read-only mode and Caja believes it will remain that way forever.
@raveit65 @monsta See the second comment, it is reproducible.
could be related to this nautilus bug ... which happens to be still not fixed there as of Ubuntu 16.04, according to reports
Ok, so you need an SD card with read-only mode set with the switch... but what about the hard disk you mentioned in the original post?
I assume the harddisk was somehow hit by this problem when the sd card was mounted first and then later the sd card reader was disconnected and the harddrive connected in its place.
Any news on this? Could you reproduce it? I myself ran into this bug again today with an SD card from a camera ... it is rather annoying... :(
I've seen this on rare occasions on only one of many boxes, with certain camera cards I have only. Wonder if this is a hardware, firmware, or kernel issue? Can you write to the card from terminal, from Nemo, or from any other program you have installed?
Yes, it always works fine from terminal. And the workaround I use to make the card writable in Caja again is to start Nautilus or Nemo alongside it, eject the card and re-insert it, then at least one of the filemanagers picks it up as writable. Once I successfuly wrote to it, I kill the extra filemanager, eject and re-insert it again and now Caja works fine with it.
I have no idea what's causing that
I have found this is occuring when a second VFAT volume is mounted. One mounts OK as read-write, but mount a second camera card VFAT flash drive and it comes up read-only, as do subsequent mounts of this file system until Caja is restarted. Linux filesystems like ext4 continue to mount normally it seems.
this seams to also happen after a reformat of an USB stick. This is how this bug hit me. Various people complain about an error on writing after a reformat. Presumably they all reformatted a FAT32.
About the work around to this. It's to restart caja with this command "caja -q" in a terminal. (the desktop it self, is an instance of caja, you need to use the command, closing all the windows is not enough)
It seems to come from gvfs-metadata which records that a medium is read-only and never updates this status afterwards. Caja uses gvfs abstraction and thus the error is returned.
try
$ gvfs-info -f /media/<username>/<usbkey-name>
and look for the filesystem
properties. If it is not writable, you need to erase the cache.
Check in ~/.local/share/gvfs-metadata
the files corresponding to the ID of the usb key and rm
them.
For reference, the explanation and the fix:
Running ubuntu-mate xenial with the official caja 1.12.7 I ran into a bug with two different USB media so far: 1) a USB 2.0 card reader with SD cards (all FAT formatted) 2) a USB 3.0 harddisk (NTFS formatted) When I mounted those with caja and then tried to copy a file to them, caja complained that the respective device was read-only, which is false, as I could write to it via any other program just fine.
Oddly enough, the following workaround seems to permanently fix it, but apparently only for that one device you use it on and only for the current user: