Rally 'Round the Tri-Mode Flag

Here's a minor Windows annoyance that Microsoft should send back to development.

Bill: We have a Windows 2003 server. When I try to remove the Read-only attribute from folders, Windows goes through the motions and appears to remove the attribute. However, when I check again, the Read-only attribute is back.

This only applies to folders, not to the files in the folders. We have an NT 4.0 domain.

If I view the same folder from our Windows 2000 server, there is no read-only attribute. It is most certainly a local setting.

I have tried taking ownership, changing rights, etc. There is no obvious local security policy. I've tried all operations as local administrator and domain administrator.

We are running a database with users telnetting to the server. The read-only access is preventing anyone other than administrators logging into the server.

Get Help from Bill

Got a Windows or Exchange question or need troubleshooting help? Or maybe you want a better explanation than provided in the manuals? Describe your dilemma in an e-mail to Bill at mailto:boswell@101com.com; the best questions get answered in this column.

When you send your questions, please include your full first and last name, location, certifications (if any) with your message. (If you prefer to remain anonymous, specify this in your message but submit the requested information for verification purposes.)

Adrian: You just happened to find one of my pet peeves with Windows Server 2003 (and Windows XP, for that matter).

That read-only checkbox you see on the folder? (See figure below.) If you look closely, you'll see that there's a little fleck of gray behind the check.

Microsoft calls this a tri-mode flag. When it has gray in the background, it indicates that some file or folder anywhere under that particular folder has been set to Read-only.

This checkmark does not actually control the Read-only attribute on the child files and folder, as you discovered. It just displays their status.

During the Windows XP beta, many testers posted comments complaining about how confusing those tri-mode flags can be. I guess they didn't confuse the developers, though, because they left them in the product.

Tri-Mode Flag is just informational
Properties for a folder containing vim, a vi-based text editor that has a graphical interface. Don't be fooled by the Read-only check box; the gray background and check mark indicates that this is a tri-mode flag and it can't be changed.

Hope this helps.

About the Author

Contributing Editor Bill Boswell, MCSE, is the principal of Bill Boswell Consulting, Inc. He's the author of Inside Windows Server 2003 and Learning Exchange Server 2003 both from Addison Wesley. Bill is also Redmond magazine's "Windows Insider" columnist and a speaker at MCP Magazine's TechMentor Conferences.

comments powered by Disqus

Reader Comments:

Thu, Nov 5, 2009 ledbetter

This is a very old post, but hey. The answer is that you have a file in use. Chances are good that a service is running that is using a component of what you are trying to delete. Stop the service, change the checkbox as described in this thread and viola!

Fri, Sep 11, 2009

This is the main reason I am leaving this network admin gig: A whole lot of shit simpli doesn't work (PERIOD). My workaround was to set-up a samba server on my linux mail server and share it. It did it for now, but trust me on this, a whole lot of shit simpli doesn't work on linux either. Screw this area, it is too much stress for stuff that we simpli have no power over it. By the way I have empty forlder with this attrib and I have tried everything else.

Wed, Feb 6, 2008 Phil Tampa

so what is the solution? geezzeeeeee, if you don't have an solution..... don't post it Adrian.... you answer lead to now where..

Tue, Jan 2, 2007 Tad Anonymous

Yes, this is a good question. What is the resolution? I have the same problem when accessing linux samba share. I am using adobe photoalbum with pictures stored on the network directory. The directory has tri-state read-only attribute, but individual files are not read-only. Program fails to rotate pictures, claiming that file is read-only.

Thu, May 11, 2006 Anonymous Anonymous

What is the resolution?

Fri, Feb 17, 2006 Xaneth Anonymous

Everyone missed the point here. Had the same issue, and guess what? Might want to check your "share level permissions" and make sure that "Everyone" has full control. These are separate from "NTFS permissions". If you don't have the "share level permssions" set properly, it can result in this behavior.

Thu, Feb 16, 2006 hippy Wales

the problem is one of language not tech:
tri-state flag is NOT a "tri-state read-only attribute indicator" it is a function box. It indicates nothing but has a function.

Tue, Jan 24, 2006 Anonymous Anonymous

I've run into this issue before. After I moved all the files from an older Windows 2000 server to a new 2003 server. No one on the network could write to the files. I tried changing the attributes in the GUI and the read only attribute kept coming back. After some research on Microsoft's support site I found a KB article that referenced this as a known problem. I had to use the attrib command on all the files in the folders and subfolders to remove the read only attribute.

Fri, Dec 9, 2005 Anonymous Anonymous

Posting is inconsistent. My first one was not added to the seven already posted items. Mine is the 8th dated 12-09-05. After pressing the "Post Comment" I got to see many postings that I presume were not added by a moderator. I then posted a 2nd comment about how I liked this feature figuring the author would see it and it wouldn't be public. The 2nd comment was quickly added to the previous seven making 8 comments and I was not able to see the many additional comments. Lets see how my 3rd comment is posted. My second comment was added so quickly that it appears this topic was not moderated at that moment.

Fri, Dec 9, 2005 Anonymous Anonymous

After posting my comment, I see I am allowed to view other comments, many more than the seven allowed by the moderator. I like this feature.

I just wrote about the quick creation of the test folder on the root of the drive. I then saw that at least one writer addressed this also.

Fri, Dec 9, 2005 Anonymous Anonymous

A simple test such as creating a new folder at the root of the drive with no subfolders or files in it shows that the new folder has the same read only grayed check which cannot be removed. Therefore I cannot see how non existant child folders and files within the new folder has anything to do with this tri-mode flag. I agree that this article does not fully address the issue.

Tue, Jul 19, 2005 Anonymous Anonymous

Still no answer for this problem. I have users who cannot write to a directory on the server and I have no way to fix the problem. I have tried every solution listed here and in various other websites. Nothing works. What am I supposed to do?

Sat, Jun 25, 2005 Martyn Pymm UK

I too had this issue where users could not save to shares even thought the permissions were correct. The problem isnt to do with the Read only permission this is a red herring.

What you need to do is look at the Share properties, Sharing tab then permissions button. It is here you need to Change Everyone from read to full control. By default it is set to READ

hope this helps.

Fri, Jun 17, 2005 Lyndon England

I have the exact same problem on a W2k3 server, newly rebuild with the data copied from another disk. Did anybody find a resolution to this problem? Users can't save changes made to files via mapped drivers to server.

Mon, Jun 6, 2005 Jonah Probell jonahprobell.com

I have the problem the Bill describes, only on a directory that is truly empty. The folder view options are set to show hidden files and folders and not to hide protected operating system files.

Why is the read-only check box setting itself again every time that I close the properties box for the empty folder?

Wed, Mar 16, 2005 Anonymous Anonymous

Glad to have gotten the information for what this is. However the article did not answer the question.

Mon, Feb 21, 2005 Zytus Lithuania

This problem is on my server 2003, how I can prevent read-only attribute on new created folder(this is empty), ant have read-only attribute, attrib.exe and chekbox can't resolve problem. Special financial programs can't work if folder have read-only attribute with user full control permissions and any file in this directory don't have read-only, but problem is directory attribute. What is solution?

Fri, Feb 11, 2005 Andrej Kaurin Anonymous

I forgot to say that there is no file with read only attribute in that folder.

Fri, Feb 11, 2005 Andrej Kaurin BiH

When it has gray in the background, it indicates that some file or folder anywhere under that particular folder has been set to Read-only.
This is not true. I tried to go down and down trough folder and, on last level (folder that doesn't contain folders) folder is also with read-only attribute and gray background.

Sun, Jan 23, 2005 constantinescu nicolaie Bucharest

So, there's no workaround for this one ?

Tue, Jan 18, 2005 Anonymous Anonymous

The question was not answered!

Wed, Dec 29, 2004 Jeff Texas

I have had the issue you are talking about happen twice. Each time when moving drives containing data to new systems. And guess what changing the check box to apply to all folders and files did not remove the file status. The files could be read but not written to. The only solution I found was to move the files to another partition on the drive or another drive. The look here, the files were able to be written to without changing the rights. Then I wipe the old partition and start new. It is a down and dirty way to go, but it works and is less painful in the long run. Yes, I know this can only be done on a partition that only contains data, no OS files.

Wed, Dec 29, 2004 Anonymous Anonymous

The easiest solution is probably the old DOS attrib command. Assuming this is the read-only attribute, and not the NTFS read attribute...

Go to the top folder you want to change and type in: attrib *.* -r /s

This will remove the read-only attribute from all files in this and subdirectories. There is also a command to change the NTFS permissions, but I'm guessing it is just file attribute.

Tue, Dec 28, 2004 Jim NJ

This is an excellent discussion and deserves a whole article addressing the issues surrounding the "Read Only" flag on folders.

Software that improperly analyzes the RO attribute is likely to fail. Microsoft has been harping on having developers "follow the rules". I have been bitten by this bug in my own code and yet older code that was designed properly didn't fail. So much fo short cute (there are may that will cause this behavior).

It's the vendor not MS that needs to make the change.

By the way. Has anyone tried setting the program compatibility attributes to force the older behavior?

Mon, Dec 13, 2004 TommyVercetti CS

I tried everything mentioned in this thread, but nothing worked. Users were trying to write data to a new W2K3 server and were getting a "Access Denied". I looked at the share permissions (the per share permission, not the NTFS permission), and the only group in there was "Everyone" and was set to "Read Only". I set that to "Full Control" and they can write just fine. But I know this can't be the solution.

Tue, Sep 14, 2004 Nostrovio Phoenix, AZ

Nice, but incomplete, article. Regardless what some might want to say, any issue that causes loss of producivity with no viable benefits (i.e. security or performance enhancement) IS a problem.

The function of the tri-state read-only attribute indicator is a flaw. Going by Past practices, the box should be clear if EVERY subordinate file is clear, dark check if ALL are checked and "greyed" if the files are a mixture of checked and not checked read-only.

The current functionality gives the impression of operating a certain way contrary to what is actually happening.

This qualifies as a bug and Microsoft needs to fix it!!

Fri, Sep 3, 2004 Anonymous Anonymous

So I want the check box to be unchecked and not grey checked, how do you do it??? Don't tell me that it doesn't matter because that wasn't the question, HOW DO YOU CLEAR IT? that was the question.

Fri, Jul 23, 2004 Anonymous Anonymous

How do you fix this problem? This is completely worthless!

Mon, Jun 14, 2004 Gill Bates West London

Terrible! Thanks for your help but it's even more frustratng now - STILL no answer......????

Wed, May 12, 2004 Don Hamilton County ESC

Good article. Points out the problem and no more because there IS NO SOLUTION....that's the reason it needs to go back to the development team.

Fri, Jan 30, 2004 damichel Anonymous

Bill, the answer does not work as explained. If you make a new folder with no files, you still have a checked Read box. What's below in the Dir does not effect it.

Fri, Jan 30, 2004 Anonymous Anonymous

I guess the poorly written app has to be poorly written to work with poorly designed OS's. Read Only by default is on the intellegence level of having none. It has nothing to do with files inside the folder. I created a new folder without any files under it and it has the same problem. The Tri mode is BS just like the Read Only by design.

Wed, Jan 28, 2004 SupportFoxx Anonymous

I guess I'm just not seeing how this is a problem beyond poorly written apps that look at an attribute that really doesn't have a true meaning. MS Support Article KB326549 describes how this attribute is and isn't used. It even describes a work-around using the attrib command from a command-line if you want a different way to work with it.

Wed, Jan 28, 2004 John Eldred

Something that any hands-on administrator can attest to "keep these articles coming".

Wed, Jan 28, 2004 Anonymous Anonymous

Decent point. current the Tri mode does seem a bit confusing, the flag should control all the files in the folder. Then the grayed image can represent a mixture of readable or readonly file as it does today.

Wed, Jan 28, 2004 Anonymous Anonymous

I have been fighting this with cameras and label printers that have to write config files to the Twain-32 folder. I can write a text file without problem, but the camera cannot write the config file. Even after the attribs were removed from all the files, it still could not write the config file. I guess this is why linux is making headway in the desktop market. (oops, was that out loud?)

Wed, Jan 28, 2004 Joe NY

No Prob. :) You got really lucky, I was looking though my email backlog when I saw the article. Anybody want to chat hit my email, I have no clue when I'll be back to this site in the near future.

Wed, Jan 28, 2004 Robert Fort Myers,FL.

you did well,thank you!!!!!!!

Wed, Jan 28, 2004 Joe NY

The answer to this problem is to 'select all' files and folders in the folder and view properties. When you uncheck the read-only box choose apply, not ok. You will get the prompt for the "this folder or all subfolders" choice.

Wed, Jan 28, 2004 Steven Chapman SC

Now that we see the problem, a solution would be nice.

Wed, Jan 28, 2004 Anonymous Anonymous

Done all these things SupportFoxx, and you are sooooooorely mistaken. Sorry!

Wed, Jan 28, 2004 Anonymous Boston

I've recently run into the same problem after migrating from an NT 4.0 domain to Server 2003. This problem is really frustrating our users. I've checked all documentation and Microsoft has no valid workarounds. Anyone able to resolve this situation???

Tue, Jan 27, 2004 Webtek Concord, NC

...and to think we paid good money to have this feature too...WooHoo!!!

Tue, Jan 27, 2004 Anonymous Boston

As supportfoxx say you can choose "Apply changes to this folder, subfolders, and files". Therefore, Adrian should have gotten that prompt, which would solve the problem.

Tue, Jan 27, 2004 SupportFoxx Anonymous

I guess that's the point I missed emphasizing. The FOLDER will ALWAYS have that check mark, regardless of the settings below. Even if every single FILE in every subfolder is Read-Only, the FOLDER still has the check box. The same is true if every file is NOT set to Read-Only; the FOLDER property will always be gray. QUICKTEST: Set a FILE's attribute to be Read-Only, close the properties and reopen it to verify, go to its FOLDER's properties and clear the Read-Only attribute (make sure to set it to apply to all subfolders and files), go back to the file and look at its properties. It's properties will now NOT be Read-Only. A problem does arise in that you can only set this on a folder to be "This folder only" or "This folder, all subfolders and files". If you use "This folder only" no FILES are changed, and therefore nothing is really changed.

Tue, Jan 27, 2004 Anonymous Anonymous

I'm very glad that you're addressing this issue as I've found it really annoying also. Though SupportFoxx claims it to be a non-issue, I can say that I've done exactly what's described in his (or her) response, to no avail. I tried to change the attributes of every file and folder in the tree; it looks as though it's happening, but then the check-mark comes back. I've even gone into a folder and tried to change the attribute on the subordinates one at a time. This is the real issue; I couldn't care less if about the semantics of whether a folder can be 'read-only' or not. Through the use of special permissions, you can create what amounts to a read-only setting for a given directory.

Tue, Jan 27, 2004 Anonymous Anonymous

Isn't there more going on here than was addressed? I support several clients...the ones with NT domains seem to have more Read-Only and/or access- denied issues on the server when there are W2K servers or XP workstations on the domain, than when they were just NT workstations.

Tue, Jan 27, 2004 SupportFoxx Anonymous

Actually, he kinda missed the mark. The truth is that attribute is a misnomer at the Folder level. A FOLDER cannot truely be Read-Only; only a FILE can be Read-Only. Therefore, rather than give you the assumtion that a file is Read-Only just because a Folder it is in Read-Only, they removed the proper display from the GUI.

The truth is, there is no need for a solution, because there is no issue; just a change in display. If you want every FILE in a tree to be Read-Only or not Read-Only:
1. Set the attribute at the Folder level
2. Click Apply
3. Choose "Apply changes to this folder, subfolders, and files"
4. Click OK
5. Click OK again
This will set all FILES in that tree to have the same Read-Only attribute.

Again, when you try to write to a file, the operation doesn't look at the attributes of the FOLDER, only the attributes of the FILE are checked. That's why this setting isn't really active in the GUI for a folder.

Tue, Jan 27, 2004 Anonymous Minneapolis, MN

I appreciate the clarification.

Tue, Jan 27, 2004 Anonymous Anonymous

I guess the solution is to drill through each file with a batch script, since only files can contain the attribute. I also spent a couple of hours and finally realized I was on a wild goose chase.

Tue, Jan 27, 2004 Anonymous Anonymous

This was done well.

Tue, Jan 27, 2004 Anonymous Anonymous

Accurate but nothing super, sort of answers the question.

Tue, Jan 27, 2004 anon Anonymous

yeah, what's the solution?

Tue, Jan 27, 2004 Anonymous Anonymous

You talked about everything but the solution to his problem. The solution is more important than your pet-peeve.

Tue, Jan 27, 2004 Anonymous Anonymous


Add Your Comment Now:

Your Name:(optional)
Your Email:(optional)
Your Location:(optional)
Please type the letters/numbers you see above

Redmond Tech Watch

Sign up for our newsletter.

I agree to this site's Privacy Policy.