Cannot change READ ONLY file attributes using Administrator Account

Anonymous
2009-10-31T21:41:55+00:00

I have tried windows explorer and a custom program called Directory Opus. I have tried creating several administrator accounts but no luck.

I cannot work with this problem existing.

I need a solution.

Windows for home | Previous Windows versions | Files, folders, and storage

Locked Question. This question was migrated from the Microsoft Support Community. You can vote on whether it's helpful, but you can't add comments or replies or follow the question.

0 comments No comments
Answer accepted by question author
Anonymous
2010-02-27T20:39:32+00:00

I have the exact same issue.  Following the steps above did not work, the folder/subfolders remain Read-Only.  I am the owner of the folder and subfolders.  I'm not even sure how they became Read-Only to begin with.  Setting Read-Only on individual files works properly.  Changing folder settings does not.

***IMPORTANT EDIT:

According to a Microsoft Knowledge Base post:

You cannot view or change the Read-only or the System attributes of folders

To summarize, Windows ignores System or Read-Only settings on folders (it does not ignore those properties on FILES however).  Individual applications that you are running may not ignore the Read-Only status on a folder and may give an error.  In my situation, an application was attempting to create a new file in a folder that was marked as Read-Only and it honored the RO setting and refused to try to create the new file.

To actually change these attributes, the Properties menu will not work.  From the KB source:

  • If you click Apply changes to this folder only , the Read-only attribute is changed for all the files in the folder. However, the Read-only attribute is not changed for the folder, its subfolders, or any files in its subfolders. If you click Apply changes to this folder, subfolders, and files , the Read-only attribute is changed for all files in the folder and all files in the subfolders. However, the Read-only attribute is not changed for the folder or its subfolders.

In order to change these properties, the user must launch a command line terminal and execute the changes by hand, such as this command:

  • attrib -r +s c:\test

...which will remove the READ-ONLY setting and apply the SYSTEM setting to the folder.  Once again, changing properties of files (including files in subfolders) works as expected with the right-click Properties -> Security menu.

Knowledge Base source:

http://support.microsoft.com/kb/326549

Bad support, MS.

Was this answer helpful?

300+ people found this answer helpful.
0 comments No comments

77 additional answers

Sort by: Oldest
  1. Anonymous
    2016-08-01T14:19:25+00:00

    attrib -r +s c:\temp

    does not work.

    Applied this as administrator of a command prompt.

    Readonly attribute is instantly set after clearing it.

    c:\temp is used as a temporary folder by mysql.  mysql will not start if this folder is marked readonly.  I don't care what Microsoft thinks about this attribute, but it interferes with service tools such as mysql that need some temporary disk space in the background.  mysql can be configured to use some other directory for this purpose, but it now appears that any Windows 10 directory has the same attribute problem, and there is no way to clear it.

    Having a tmp directory open to any service is an old Unix tradition.  Changing this standard in Windows 10, and then making it impossible to release this restriction is obviously creating a lot of trouble for a lot of developers, myself included.

    When will Microsoft fix this problem with an upgrade?  ...instead of lecturing us about why it isn't important.

    Was this answer helpful?

    4 people found this answer helpful.
    0 comments No comments
  2. Anonymous
    2016-08-01T14:36:00+00:00

    I did this.  All user names are to Allow all operations.  It did not solve the problem.

    That includes:

    SYSTEM

    (me)

    Account Unknown...

    Administrators

    The security system seems to be centered on particular persons, rather than installed programs.

    Who is the 'person' behind mysql?  I don't know.

    Should fall under SYSTEM, seems to me, but SYSTEM has full access like the other three above.

    By the way, your images appear to be from an earlier Windows version.  Windows 10 shows roughly the same labels, but with different icons.

    Was this answer helpful?

    0 comments No comments
  3. Anonymous
    2016-08-02T00:12:31+00:00

    Here's something I discovered with respect to the "Read-only" property of a folder C:\temp:

    1. Navigate to the containing folder, e.g. C:
    2. Right click on temp.  This will open a 'temp Properties' window.
    3. Clear the Read-only attribute.
      1. you will get a window asking about all the contained folders/files.
      2. Choose read-only for all of them.
    4. DO NOT close the 'temp Properties' window.  Just leave it open on the desktop.
    5. Closing the 'temp Properties' window on either OK or CANCEL appears to instantly reset this attribute.

    Fixing this problem should be simple at Microsoft -

    1. Find where this window is opened in the windows code.
    2. Find how it is closed.
    3. Stop whatever is resetting this attribute.

    Could be security breaches here, but Windows Defender has a way of allowing particular folders and files to evade security checks.  I used WD to bypass security on c:\temp, but it did nothing.

    Some other service appears to be setting this attribute.  I discovered that the problem went away for at least an hour after rebooting Windows.  Then it came back, stopping mysql from running.  I have no idea which task did me in, but it obviously is something in Windows.  Maybe Defender?

    Of course, there could be a ton of function calls, etc. on the window closing.  Only Microsoft and God would know about that.

    Was this answer helpful?

    2 people found this answer helpful.
    0 comments No comments
  4. Anonymous
    2016-08-10T20:36:11+00:00

    Well, I stumbled into this problem today when I tried to remove a program that I no longer needed.  The company provided uninstall as is typically the case left lots of files behind.  However, in this case it may have not been their fault.  Turns out about a dozen files had the Read-Only attribute set as outlined here.  I waded through this article and few others, but kept coming back to this one, especially since someone had updated it the first of August.

    Here is how I was able to fix my problem, whether it will work for you or not only time will tell.

    1.  I booted off a Windows 7 Repair USB stick I have.  (I suspect a DVD should work).

            (Might be good idea to use appropriate Windows Repair software.)

    1.  Wait till given a choice and selected Other Repair option.
    2.  Selected Command Prompt.
    3.  Then did attrib -r +s to files and folders to be deleted.

           (The r attribute was finally missing from the files.)

    1.  Now attrib -s to files and folders to be deleted.

           (So I could see them.)

           (The r attribute was "still" missing from the files.)

    1.  Deleted files with del and folders with rd.  (I suspect I could have used rd with /s.)
    2.  Rebooted into normal drive.

    Like I said this worked for me this time.  The key I guess was getting access to the folder in question with another Operating System.

    On of my pet gripes with Windows and to some degree Linux/UNIX and I guess by association Apple is the hoops one must jump through to work on files in the OS "sometimes".

    This definitely being one of those times.

    Was this answer helpful?

    0 comments No comments