Read-only Attribute for a Windows folder

Page 1 of 2 12 LastLast

  1. Posts : 7
    Windows 7 Enterprise 64 bit
       #1

    Read-only Attribute for a Windows folder


    I’m running a Visual Studio app that fails because the folder Temporary ASP.NET Files is Read-only. In Windows Explorer, there is a checkmark next to Read-only in the folder properties. However, it does not remain unchecked if I uncheck it, even though I’m an Administrator.

    If I display the Attributes column in Windows Explorer the only attribute indicated for this folder is D (for Directory).

    I also tried to display the folder attributes in a Command Prompt as an Administrator using the attrib command as follows:

    c:\Windows\Microsoft.NET\Framework64\v2.0.50727>attrib /d /s "Temporary ASP.NET Files"


    This returns the following without indicating any attributes:

    c:\Windows\Microsoft.NET\Framework64\v2.0.50727>

    The Read-only attribute reportedly can be removed through a command prompt by using the –R parameter. I would rather not run this command though without first confirming that the Read-only attribute is enabled.

    My question is this – why would this folder have Read-only checked in the folder properties, but does not display this attribute in the Attributes column of Windows Explorer nor in a command prompt as described here?

    Thanks.
      My Computer


  2. Posts : 7,107
    W7 home premium 32bit/W7HP 64bit/w10 tp insider ring
       #2

    Hi Bontrager,
    Might be me but thats an OLD version of .Net, current version 4.6.X.
    try updating to the current version, things might change,

    Roy
      My Computer


  3. Posts : 7
    Windows 7 Enterprise 64 bit
    Thread Starter
       #3

    Thanks, but the app involved was developed under and still requires Visual Studio 2008 which can run no version later than .NET 3.5.

    That's a moot point though - the question is why would any folder's properties have Read-only checked, but not show the Read-only attribute when the Attribute column is displayed in Windows Explorer nor when the Attrib command lists the attributes for that folder in a Command Prompt.

    If that question could be answered, it might become apparent as to how I can uncheck Read-only in the folder's properties as this apparently is causing the app to fail.

    Thanks.
      My Computer


  4. Posts : 72,046
    64-bit Windows 11 Pro for Workstations
       #4

    Hello Bontrager, and welcome to Seven Forums. :)

    Just to verify. If the Read-only box is this , then it's not actually checked.

    Read-only File and Folder Attribute
      My Computer


  5. Posts : 7
    Windows 7 Enterprise 64 bit
    Thread Starter
       #5

    Thanks. The checkbox actually has a checkmark.
      My Computer


  6. Posts : 72,046
    64-bit Windows 11 Pro for Workstations
       #6

    It won't hurt anything to run the command to remove the Read-only attribute to see if that may help.
      My Computer


  7. Posts : 7
    Windows 7 Enterprise 64 bit
    Thread Starter
       #7

    I came upon the a Microsoft tech note that describes exactly the scenario I encountered (cannot uncheck the Read-only checkbox of a folder's properties). See the section under Steps to work around this problem at the following link: https://support.microsoft.com/en-us/kb/326549

    I ran the following command as an Administrator with the syntax decribed in the tech note:

    c:\>attrib-r +s "C:\Windows\Microsoft.NET\Framework64\v2.0.50727\Temporary ASP.NETFiles"

    However, after running this command, a checkmark still appears next to Read-only in the the properties of the folder "Temporary ASP.NET Files".

    If anyone has any ideas on this, please let me know. Thanks.
      My Computer


  8. Posts : 72,046
    64-bit Windows 11 Pro for Workstations
       #8

    The command you posted above has an error in it. There should be a space after attrib like below.

    attrib -r +s "C:\Windows\Microsoft.NET\Framework64\v2.0.50727\Temporary ASP.NETFiles"

    Does using the command below show the attrib to still be Read-only for the folder?

    attrib "C:\Windows\Microsoft.NET\Framework64\v2.0.50727\Temporary ASP.NETFiles"
      My Computer


  9. Posts : 7
    Windows 7 Enterprise 64 bit
    Thread Starter
       #9

    Thanks for picking up the missing blank space.

    Please note that the command you suggested doesn't recognize the directory.

    c:\>attrib "C:\Windows\Microsoft.NET\Framework64\v2.0.50727\Temporary ASP.NETFil
    es"
    File not found - C:\Windows\Microsoft.NET\Framework64\v2.0.50727\Temporary ASP.N
    ETFiles


    Adding the /d switch (to recognize the directory) indicates the /s switch is also required.
    c:\>attrib /d "C:\Windows\Microsoft.NET\Framework64\v2.0.50727\Temporary ASP.NET
    Files"
    The /D switch is only valid with the /S switch.


    'File not found' after adding /s switch.
    c:\>attrib /d /s "C:\Windows\Microsoft.NET\Framework64\v2.0.50727\Temporary ASP.
    NETFiles"
    File not found - C:\Windows\Microsoft.NET\Framework64\v2.0.50727\Temporary ASP.N
    ETFiles


    Here's the command to remove the Read-only attribute (with the missing blank space added) per the MS tech note. Still get 'File not found.'
    c:\>attrib -r +s "C:\Windows\Microsoft.NET\Framework64\v2.0.50727\Temporary ASP.
    NETFiles"
    File not found - C:\Windows\Microsoft.NET\Framework64\v2.0.50727\Temporary ASP.N
    ETFiles


    The result of the above command is that the Read-only checkmark is not removed from the Temporary ASP.NETFiles folder. The following command was run to reverse the above command (per the MS tech note.)

    c:\>attrib -r -s "C:\Windows\Microsoft.NET\Framework64\v2.0.50727\Temporary ASP.
    NETFiles"
    File not found - C:\Windows\Microsoft.NET\Framework64\v2.0.50727\Temporary ASP.N
    ETFiles

    c:\>

    The 'File not found' message might refer to the fact that the Temporary ASP.NETFiles folder does not contain any files. Regardless, I would expect that the Read-only checkmark would be removed from the folder by running the command as described in the MS tech note.

    Any other ideas, please let me know. Thanks.
      My Computer


  10. Posts : 72,046
    64-bit Windows 11 Pro for Workstations
       #10

    That error indicates that it can't find the folder. Are you sure you have the correct path?
      My Computer


 
Page 1 of 2 12 LastLast

  Related Discussions
Our Sites
Site Links
About Us
Windows 7 Forums is an independent web site and has not been authorized, sponsored, or otherwise approved by Microsoft Corporation. "Windows 7" and related materials are trademarks of Microsoft Corp.

© Designer Media Ltd
All times are GMT -5. The time now is 15:21.
Find Us