Read Only attribute cannot clear

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.
seramaiAsked:
Who is Participating?

Improve company productivity with a Business Account.Sign Up

x
 
ocanada_techguyConnect With a Mentor Commented:
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.
0
 
dbruntonCommented:
Let's see.  Assuming your flash drive is H: and you are Administrator.

attrib    -s    H:\*.*     /s     /d
attib     -r     H:\*.*     /s     /d
0
 
seramaiAuthor Commented:
Did not work. See attached.
--Doc1.docx
0
Keep up with what's happening at Experts Exchange!

Sign up to receive Decoded, a new monthly digest with product updates, feature release info, continuing education opportunities, and more.

 
YarnoSGConnect With a Mentor Commented:
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:  http://support.microsoft.com/kb/812003
0
 
YarnoSGCommented:
Also, since you said this was on a flash drive, does the drive in question have a read-only or "lock" switch on it?
0
 
seramaiAuthor Commented:
Drive does not have a lock on it.

Cannot save changes to files opened from flash drive.
0
 
HainKurtConnect With a Mentor Sr. System AnalystCommented:
copy files to hdd, do it on hdd
format card and copy ;)
0
 
dbruntonConnect With a Mentor Commented:
>>  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.
0
 
seramaiAuthor Commented:
Word and Excel files.
0
 
ocanada_techguyCommented:
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.
0
 
seramaiAuthor Commented:
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.

0
 
seramaiAuthor Commented:
Never mind. I just did the sharing thing and that unchecked the read only attribute of the content of the file folders.
0
Question has a verified solution.

Are you are experiencing a similar issue? Get a personalized answer when you ask a related question.

Have a better answer? Share it in a comment.

All Courses

From novice to tech pro — start learning today.