LinuxQuestions.org
Review your favorite Linux distribution.
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Newbie
User Name
Password
Linux - Newbie This Linux forum is for members that are new to Linux.
Just starting out and have a question? If it is not in the man pages or the how-to's this is the place!

Notices


Reply
  Search this Thread
Old 02-12-2015, 04:15 PM   #1
glhere
LQ Newbie
 
Registered: Sep 2006
Posts: 17

Rep: Reputation: 0
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
 
Old 02-12-2015, 05:08 PM   #2
suicidaleggroll
LQ Guru
 
Registered: Nov 2010
Location: Colorado
Distribution: OpenSUSE, CentOS
Posts: 5,258

Rep: Reputation: 1947Reputation: 1947Reputation: 1947Reputation: 1947Reputation: 1947Reputation: 1947Reputation: 1947Reputation: 1947Reputation: 1947Reputation: 1947Reputation: 1947
Have you tried completely reformatting the drive? What is it currently formatted as? Who is the owner of the files on the drive?
 
Old 02-12-2015, 09:20 PM   #3
jefro
Moderator
 
Registered: Mar 2008
Posts: 15,374

Rep: Reputation: 2198Reputation: 2198Reputation: 2198Reputation: 2198Reputation: 2198Reputation: 2198Reputation: 2198Reputation: 2198Reputation: 2198Reputation: 2198Reputation: 2198
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.
 
1 members found this post helpful.
Old 02-13-2015, 12:56 PM   #4
glhere
LQ Newbie
 
Registered: Sep 2006
Posts: 17

Original Poster
Rep: Reputation: 0
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.

Last edited by glhere; 02-13-2015 at 01:04 PM. Reason: clarity
 
Old 02-13-2015, 06:56 PM   #5
jefro
Moderator
 
Registered: Mar 2008
Posts: 15,374

Rep: Reputation: 2198Reputation: 2198Reputation: 2198Reputation: 2198Reputation: 2198Reputation: 2198Reputation: 2198Reputation: 2198Reputation: 2198Reputation: 2198Reputation: 2198
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?
 
Old 02-15-2015, 04:32 PM   #6
glhere
LQ Newbie
 
Registered: Sep 2006
Posts: 17

Original Poster
Rep: Reputation: 0
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?

Last edited by glhere; 02-17-2015 at 08:45 PM. Reason: clarity, further notation
 
  


Reply


Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
[SOLVED] How Can I Change the Label of My Mounted USB Flash Drive? wguayan Linux - General 2 09-05-2012 09:52 PM
[SOLVED] Western Digital External drive read-only under Gentoo - NTFS issue - solved CliveBerry Linux - Hardware 1 06-21-2010 02:47 PM
USB flash drive (Pen drive) mounts read only prabhatsoni Linux - Hardware 24 07-02-2007 02:28 PM
9.3 ACPI USB Flash Drive Solved mpapet SUSE / openSUSE 4 08-01-2005 05:10 PM
linux 9.0 wont read half of the D: drive futuretech Linux - Hardware 2 01-05-2004 12:29 PM


All times are GMT -5. The time now is 06:39 AM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration