LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Linux - Newbie (https://www.linuxquestions.org/questions/linux-newbie-8/)
-   -   flash drive read-only half solved (https://www.linuxquestions.org/questions/linux-newbie-8/flash-drive-read-only-half-solved-4175533836/)

glhere 02-12-2015 03:15 PM

flash drive read-only half solved
 
Lots of posts on internet about flash drives ending up read-only in Linux after using on a windows or mac systme. Gather it is a problem with incorrectly ejecting or the ejection being poorly done.

Usually I can go back to the box and re-eject and all is well. This time even GParted and the resident fedora 21 Disk Utility programs did not even see the drive (which Was visible under "files").

Using disk utility on the "offending" machine, it seems there were many files that were truncated (due to some eject issue? Note the ejection was done "according to Hoyle" :) ); regardless the flash drive was still read-only. Howeverk, re-trying GParted, which now recognized the drive, the drive was unmounted checked. Some repair was necessary. Currently, I can read, write and copy within the drive.

However, the drive itself is still only read-only for all but the owner (which is not even root). I cannot copy any file to the flash drive. Chmod does nothing (no matter if root or other user tries). I suppose I should be satisfied for the access there is, but if anyone has any more suggestions, it would be great.

Thanks in advance for any info/interest

suicidaleggroll 02-12-2015 04:08 PM

Have you tried completely reformatting the drive? What is it currently formatted as? Who is the owner of the files on the drive?

jefro 02-12-2015 08:20 PM

Kind of a lot going on here.

In normal use a usb flash drive should be known to MS and Mac as a removable media. It is supposed to try to allow one to mishandle it a bit. If one uses the safe removal and it does say one can remove it then we'd assume all files have been written and set as written.

Now, if one does eject instead of removal it may cause this.

Could be also any number of static and poor controller or other issues.


Chmod under root should always change a working drive's file permission.

Get a new drive and test it.

glhere 02-13-2015 11:56 AM

flashdrive read-only half solved
 
Thanks all for replies

1. Since the new mac OS came out I have been having these "eject" problems (on macs one must "eject" or problems do arise) - as noted if the eject is not done correctly (even if the machine indicates the ejection was ok) a return to a mac to repeast the process was all that was necessary. Lately this ejection process has taken longer, which may indicate a thumbdrive issue, yes. But the drive works well, behaves, shows no wear when used on the linux machine (and can be read by a mac regardless of how it was removed from said PC ejected. Note, I usually don't just remove a drive from any box before shutting down all programs I have used on it, quitting all files being used.)

2. Other flash drives have exhibited the same behavior tho I have not seen this extreme a response. (The other thyumbdrives aren't used as much (which again might point to a drive issue...again, no problems with this drive on boxes other than macs with the noew OS))

I have been reading and it seems Linux, well in my case I have been reading about Fedora :P but it might be ok to generalize here, has been adding a lot of security checks. One post comment mentioned that if the Linux distro detects any strange additions to files or "corrupt" files (in the distros's "mind"), the distro will not do more than allow a read - no interaction would go on. Well, I have been able to save read-only files to my linux desktop, so dunno. But that is beyond the point here, yes? Just a bit of info that might be investigated at some time (by more informed peopole than myself! :])

as stated, chmod or using Nautilus, etc to change the permissions is not possible. The owner is "me" on all OS and no way suggested has yet allowed permission changes to be affected other than by using the disk utiiity on the offending machine (mac) first then GParted (or I assume "disks") on the Linux box. That is, all permissions in all the sub-folders on the drive, not the drive itself. I would like to have permissionto copy to the drive tho and am out of suggestions as to how to do this other than to reformat (which I really don't want to do).

That is, perhaps your reformatting suggestion is the only way to go...will hold off a bit to see if there is another way (will still be searching online for an answer) as this does seem strange, that

3. all the read and checks by the disk utility programs left the one read-only permission intact while changing all the sub-folders owner, group and others permissions back to the default. Wonder if that is typical...or maybe I need to re-do the check and repairs at a higher level? (Don't know how to do that!)

Thanks again for suggestions to what is a probably a pretty mundane situation...appreciate your taking the time.

jefro 02-13-2015 05:56 PM

I'd try the reformat or partition for sure as it shouldn't hurt.(as suggested above)

Not sure I've seen this exact situation as you report. It may be some issue related to mac.

What file system format is this flash drive in?

glhere 02-15-2015 03:32 PM

flash drive read-only half-solved
 
the flash drive format is FAT32

it is a sanDisk 16GB drive

PS this just occured to me: is this a sanDisk problem? Most of the postings I have found/read indicate the drives are sanDisks. This could mean several things - sanDisks are popular with people who use different )Ss, or perhaps there is some sensitivity? :P ? I truly love this drive (great profile etc but perhaps sanDisk people would know how to prevent this issue without having to reformat. Nah, probably a Linux security deal as some have posited)
'
Oh well, thanks in advance for any new thoughts

Summary
A few days ago I posted that once the process of using disk utilities was followed on both a mac then on linux, permissions on the sub-files (previously totally read-only) are read and writable. The permissions on the drive itself however, are still "read-only".

Permissions on the top lovel of the disk are still read-only. And before using the disk utilities, "read-only" meant "read-only" (one could not copy any files to the drive itself). This has NOW changed. Though, at the top level, the permissions still are "read-only", files can NOW be now copied to and from the drive. This seems pretty strange to me - anyone have an explanation?


All times are GMT -5. The time now is 10:12 PM.