Read Only attribute cannot clear

Posted on 2010-11-27
Last Modified: 2012-05-10
I cannot clear the read only attribute from all of the folders on my flash drive. I have a Windows XP box.

I have tried to take over the file permissions.

I have tried the command line attrib -r +s stuff.

No luck.
Question by:seramai
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
  • 5
  • 2
  • 2
  • +2
LVL 49

Expert Comment

ID: 34223999
Let's see.  Assuming your flash drive is H: and you are Administrator.

attrib    -s    H:\*.*     /s     /d
attib     -r     H:\*.*     /s     /d

Author Comment

ID: 34224033
Did not work. See attached.

Assisted Solution

YarnoSG earned 100 total points
ID: 34224042
If the files have been "Customized" to use an XP view (like say for example "Media folder") the Read Only flag will be set on the FOLDER, but not its contents.  You can read and write files into the folder even when this is set-  using attrib as dbruinton suggests will not remove this "attribute".  Read this KB article for more information:
The Eight Noble Truths of Backup and Recovery

How can IT departments tackle the challenges of a Big Data world? This white paper provides a roadmap to success and helps companies ensure that all their data is safe and secure, no matter if it resides on-premise with physical or virtual machines or in the cloud.


Expert Comment

ID: 34224045
Also, since you said this was on a flash drive, does the drive in question have a read-only or "lock" switch on it?

Author Comment

ID: 34224067
Drive does not have a lock on it.

Cannot save changes to files opened from flash drive.
LVL 56

Assisted Solution

HainKurt earned 100 total points
ID: 34224095
copy files to hdd, do it on hdd
format card and copy ;)
LVL 49

Assisted Solution

dbrunton earned 100 total points
ID: 34224240
>>  Cannot save changes to files opened from flash drive.

Give us an example - file type please like a Word document.

Normally I'd expect there to be a warning on opening that this is a read only file.

Author Comment

ID: 34225350
Word and Excel files.
LVL 11

Accepted Solution

ocanada_techguy earned 200 total points
ID: 34225479
Usually this happens when more than one computer is involved.  Since this is a flash drive I am thinking that's probable.  We also see this with external hard disks.

It's not really the read-only "attribute" in the old DOS/Win9X fat sense that is the problem, it is a priviledges, that is a PERMISSIONS and OWNERSHIP issue, which Windows NT/XP/2K/7/etc enforce regardless of whether it is FAT/FAT32 or NTFS4/5

Let's say you're on computer A, you create a folder on the stick.  The owner will be user M of computer A, probably belonging to the Administrators group of machine A, but perhaps just the Users group of A.  In any case, the default permissions on the folder are such that the owner is M, and members of the A\Administrators have full control, and perhaps A\Users does too, or not.  There is a special built-in group called "Everyone" and that only has read priviledge.

This often happens when on machine A when managing user M in control panel the user elected to check that attribute that says keep my files and folders "private"  As an aside, obviously at that time if one had chosen to encrypt one's files, and/or had chosen encryption on the stick, that would be another problem on top.

Now when you go to machine B, user N on machine B  is not the owner and only has read permission (the tickbox attribute having nothing to do with it)

Now one of the obstacles is often that over on machine B, or C, D etc, it may be that THOSE machines are set to "use simple file sharing (recommended)", so that if you look at the properties of the folder(s) and click Advanced, the OS is still keeping the elaborate ownership and permission priviledges dialogs under the blankets such that you do not see them.  In Explorer, if you click Tools, Folder Options, View, and scroll to the bottom of the list, the Use Simple file sharing mode is checked or not.

You can either deal with thepermission ownership issue by examining the Advanced security permissions and ownership with Simple file sharing turned off over on machine A where this all happened, or else deal with it on machine B where you are facing the problem.

On machine B, once simple sharing is turned off, go to the folder on the flash drive and then do Properties, and look at the Advanced Security.  You will notice that instead of showing the permissions as machineA\userM it is a {018364seeminglyrandom}\ GUIDs, those are the Globally Unique Identifiers (GUIDs) of the "other" machine A user M, but since machine B and A don't participate in a domain security model, it cannot sustitute the correct friendly name of other machines it is not sharing the same security with.

There are a couple of fixes.  If you want to leave all this security nonsense alone, you could copy the files to the local drive of machine B unser user N where you then will have ownership and permission.

OR... you can change the permission on the folder(s) on the flash drive... one of two ways.  You can either chageit so the special uiversal catch-all user called "Everyone" has full or write or sufficient permission, or... you can ADD MachineB\Users group and/or MachineB\Administrators group and/or machineB\UserN to the permissions with full or sufficient priviledge.  I say ADD and NOT change because if you change or remove the GUIDs representing machine A, then you'll have the problem again when returning to machine A.

The "Everyone" means you've opened it wide-up, so any other machine C, D, E etc it will also have permission.  If you do machine specific by adding, then the mahine A and machine B have full/Sufficient permission but not others.  That would be some small measure of safety precaution or security that anyone on any other machine would have to go through this exact same rig-a-ma-roll to overcome, not that it is that difficult to overcome when you know how.  Encryption on the other hand, that is way more secure.

In order to change the permissions, you're going to need to be the owner or have administrative rights.  HOWEVER as it stands at the moment as yet the Administrators group and Owner are probably also showing as GUIDs from a different machine, machine A's not machine B's,  so to "correct" the permissions it will probably say you need to take ownershiip.

The way folder permissions work, as a general rule all these permissions are set-up for the PARENT folder and then all files and subfolders underneath are set to "Inherit permissions".  So instead of trying to fix the permissions one-by-one or tens or hundreds or thousands of objects, change it on the parent folder, and by default the inheritance is also done, unless you change some of the checkboxes about inheritance in which case you'll end up changing one object not all of them.
LVL 11

Expert Comment

ID: 34225512
By the way, unlike the network user sharing, it does NOT matter if you made a user with the same "friendly name" and password on both machines, user "Fred" or "Seramai" on machine A is NOT ever considered the same as "Fred" or "Seremai" on machine B, the GUIDs are different.   (Joining a domain security model at all machines would keep it the same, but you'd face the same problem as soon as you go to a machine not part of the domain)

I'll add, once rectified you can turn simple file sharing back on again, which as a rule helps avoid such complexity and confusion, unless as we said, in control panel a user has asked for their files to be kept private from other machine A users, which certainly means they're also semi-private from users on B, C, etc.

Author Comment

ID: 34226405
Ok a little more info here.

I have done the administrative rights thing and that does not seem to help.

What this stems from is I removed the TrueCrypt volume from my flash drive, reformatted the flash drive and dumped everything back on it with the result being every folder and every file in every folder being read only.

By way of an aside, I don't understand why it is necessary for the OS to do that. I don't understand the thinking behind this.

Also, the folders on my desktop are read only, but the file contents are not.

Yet, when I copy the stuff off my flash drive and into a new folder on the desktop, both the folder and the contents of the folder are read only.

This is maddening.

I am going to reformat the flash drive again and add files back to see what happens.


Author Comment

ID: 34226416
Never mind. I just did the sharing thing and that unchecked the read only attribute of the content of the file folders.

Featured Post

On Demand Webinar - Networking for the Cloud Era

This webinar discusses:
-Common barriers companies experience when moving to the cloud
-How SD-WAN changes the way we look at networks
-Best practices customers should employ moving forward with cloud migration
-What happens behind the scenes of SteelConnect’s one-click button

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

If you have done a reformat of your hard drive and proceeded to do a successful Windows XP installation, you may notice that a choice between two operating systems when you start up the machine. Here is how to get rid of this: Click Start Clic…
When you start your Windows 10 PC and got an "Operating system not found" error or just saw  "Auto repair for startup" or a blinking cursor with black screen. A loop for Auto repair will start but fix nothing.  You will be panic as there are no back…
Two types of users will appreciate AOMEI Backupper Pro: 1 - Those with PCIe drives (and haven't found cloning software that works on them). 2 - Those who want a fast clone of their boot drive (no re-boots needed) and it can clone your drive wh…
Michael from AdRem Software explains how to view the most utilized and worst performing nodes in your network, by accessing the Top Charts view in NetCrunch network monitor ( Top Charts is a view in which you can set seve…

617 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question