2

I select the following option to set the "Read Only" flag at the folder level and to cascade this flag setting to all of the descendant objects...

enter image description here

When I check the files after initiating this command, they of course all have the read only flag set. However, when I check the folder, I see the Read Only flag check box appears in "Mixed state" even though all of the files have the flag set.

enter image description here

I know that Read Only is a property of a file, but is it also a property of a Folder? The Dialog box suggests that it is. However, why is the check box appearing mixed when I display the Read Only property of the folder? All of the files in this folder had there Read Only flag set, so the check box could not be representing a mixed status of the files within the folder.

It looks to me as though this check box is just used as a quick way to cascade the flag setting down, but the dialog box asks me if I "want to set it to the folder only" which confuses me since it does appear to work as though it is a property of the folder.

Ivan
  • 2,364

3 Answers3

3

According to http://support.microsoft.com/kb/326549,

Unlike the Read-only attribute for a file, the Read-only attribute for a folder is typically ignored by Windows, Windows components and accessories, and other programs. For example, you can delete, rename, and change a folder with the Read-only attribute by using Windows Explorer.

Also,

Windows Explorer does not allow you to view or change the Read-only or System attributes of folders.

See also:

Folder keeps changing back to read-only. What permissions setup causes this in Windows?

Windows 7 / 64 bit: Folder stays write protected after change

Windows XP doesn't actually recursively change attributes

2

In Windows, GUI does not display whether the folder has Read-only attribute set or not. The check box of Read-only attribute is always in mixed/undetermined position. In Windows 7, there's a note Only applies to files in folder next to Read-only attribute:
Users properties: Read-only attribute in undetermined stated with note “Only applies to files in folder”

You can check whether the attribute is set by using attrib utility:

C:\>attrib Users
     R       C:\Users

This Read-only attribute on folders has a special meaning for Windows Shell, Explorer: it makes it read desktop.ini in the folder, if it exists.

You check it by playing with Read-only attribute on My Documents folder, for example:

attrib -R "My Documents"

The icon of My Documents will become regular folder icon. To restore it, run

attrib +R "My Documents"

 
As other answers already said, Windows GUI allows removing a folder even if its Read-only attribute is set, although command-line rmdir cannot delete it if the folder is Read-only:

mkdir test
attrib +R test
attrib test
     R       test
rmdir test
Access is denied.

attrib -R test
rmdir test

The folder test is removed now.

0

Yes, a folder/directory has its own read/write permissions. Modern OSs (including Windows) tend to imitate the Unix directory concept, where the directory is just a file with special restrictions on how it can be modified. Notice that the dialog you used says "Apply changes to folder, subfolder, and files." (Italics mine.)

Which doesn't answer the important part of your question: why are your permissions still mixed?