Solved

Read Only attribute cannot clear

Posted on 2010-11-27
12
677 Views
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.
0
Comment
Question by:seramai
  • 5
  • 2
  • 2
  • +2
12 Comments
 
LVL 48

Expert Comment

by:dbrunton
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
0
 

Author Comment

by:seramai
ID: 34224033
Did not work. See attached.
--Doc1.docx
0
 
LVL 7

Assisted Solution

by:YarnoSG
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:  http://support.microsoft.com/kb/812003
0
 
LVL 7

Expert Comment

by:YarnoSG
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?
0
 

Author Comment

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

Cannot save changes to files opened from flash drive.
0
 
LVL 51

Assisted Solution

by:HainKurt
HainKurt earned 100 total points
ID: 34224095
copy files to hdd, do it on hdd
format card and copy ;)
0
Complete VMware vSphere® ESX(i) & Hyper-V Backup

Capture your entire system, including the host, with patented disk imaging integrated with VMware VADP / Microsoft VSS and RCT. RTOs is as low as 15 seconds with Acronis Active Restore™. You can enjoy unlimited P2V/V2V migrations from any source (even from a different hypervisor)

 
LVL 48

Assisted Solution

by:dbrunton
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.
0
 

Author Comment

by:seramai
ID: 34225350
Word and Excel files.
0
 
LVL 11

Accepted Solution

by:
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.
0
 
LVL 11

Expert Comment

by:ocanada_techguy
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.
0
 

Author Comment

by:seramai
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.

0
 

Author Comment

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

Featured Post

Is Your Active Directory as Secure as You Think?

More than 75% of all records are compromised because of the loss or theft of a privileged credential. Experts have been exploring Active Directory infrastructure to identify key threats and establish best practices for keeping data safe. Attend this month’s webinar to learn more.

Question has a verified solution.

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

Most of the time we are in fix when all of sudden our systems behave weirdly.  Such problems cost time and effort... so it's best to take some preventive actions so that we can avoid such issues or overcome such problems more easily. Preventive M…
Migration of Exchange mailbox can be done with the ExProfre.exe tool. But at times, when the ExProfre.exe tool migrates the Exchange Server user profile, it results in numerous synchronization problems. Synchronization error messages appear in the e…
This video explains how to create simple products associated to Magento configurable product and offers fast way of their generation with Store Manager for Magento tool.
Delivering innovative fully-managed cloud services for mission-critical applications requires expertise in multiple areas plus vision and commitment. Meet a few of the people behind the quality services of Concerto.

932 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

Need Help in Real-Time?

Connect with top rated Experts

12 Experts available now in Live!

Get 1:1 Help Now