none
How to unset folder/file read-only attribute

    Question

  •  

    I've just got my new Vista laptop and am having trouble with folder properties. I'm logged in as Adminstrator because I'm the only user and its not connected to the internet, yet.

    I right-click on a folder to bring up the Properties dialog. In the General tab Attributes is set to Read-only. I click on the blue box to unset this and click on OK to close the dialog. When I right-click and bring up the dialog again the Read-only attribute is still set????

    How can I permanently unset the Read-only attribute?, for folders and files.

     

     

     

     

     


     

    Thursday, May 03, 2007 2:07 PM

Answers

  • NTFS permissions can be changed using the Security tab (assuming you have it on your edition of Vista and that Simple File Sharing is disabled). Alternatively you can use a command line tool such as cacls.exe to alter permissions.

     

    The state of the read only flag on a folder is meaningless, it exists only to allow you to reset the state of all files in the current directory (or subdirectories) if you so choose. Files that are marked as Read Only might be treated as read only by some applications but there is no real guarantee of that (notice that Explorer will quite happily let you delete them). Generally speaking there is little point changing it.

     

    In terms of the settings, they mean:

     

    clear - disabled, the read only flag will be cleared on files

    filled blue - ignore, do not change this setting on files

    ticked - enabled, the read only flag should be set on files

    Friday, May 04, 2007 9:32 AM
  • Writing to Program Files is a privileged operation that can normally only be done from an elevated application. You'll probably find that the log file write has been virtualised and stored in your user profile. If you navigate to the directory in Explorer and then click the Compatability Files button at the top it will take you to the location of the virtualised write (something like  %userprofile%\AppData\Local\VirtualStore\Program Files\)
    Friday, May 04, 2007 10:47 AM

All replies

  •  

    The read only attribute on folders is a legacy throwback from DOS. Windows uses it to determine whether the folder has a customized Explorer view, changing it in the GUI won't actually make any difference.

     

    If you have issues changing the contents of folders, you probably want to check the NTFS permissions rather than the attributes (though some older applications will respect the read only attribute on individual files)

    Thursday, May 03, 2007 7:27 PM
  •  

    Can you tell me how to check/change the NTFS permissions.

     

    When I successively click on the Read-only attributes box it cycles through the three state

     - clear
     - filled blue
     - checked

    what do each of these mean and how are they controlled.

     

    Friday, May 04, 2007 7:43 AM
  • NTFS permissions can be changed using the Security tab (assuming you have it on your edition of Vista and that Simple File Sharing is disabled). Alternatively you can use a command line tool such as cacls.exe to alter permissions.

     

    The state of the read only flag on a folder is meaningless, it exists only to allow you to reset the state of all files in the current directory (or subdirectories) if you so choose. Files that are marked as Read Only might be treated as read only by some applications but there is no real guarantee of that (notice that Explorer will quite happily let you delete them). Generally speaking there is little point changing it.

     

    In terms of the settings, they mean:

     

    clear - disabled, the read only flag will be cleared on files

    filled blue - ignore, do not change this setting on files

    ticked - enabled, the read only flag should be set on files

    Friday, May 04, 2007 9:32 AM
  •  

    Thanks for that comprehensive answer!  I checked on the Security tab and as administrator I have got full access.

     

    The reason it came up was because I installed a program (in Program Files) that is supposed to create and write to an error log in the Program Files directory, but it never appears. Works fine on my XP desktop but no luck with the Vista laptop. I assumed it must be because Program Files is permanently Read-only enabled.  Sounds like there might be an issue with the program itself, but I can't think what though.

     

     

     

     

     

     

     


     

    Friday, May 04, 2007 9:58 AM
  • Writing to Program Files is a privileged operation that can normally only be done from an elevated application. You'll probably find that the log file write has been virtualised and stored in your user profile. If you navigate to the directory in Explorer and then click the Compatability Files button at the top it will take you to the location of the virtualised write (something like  %userprofile%\AppData\Local\VirtualStore\Program Files\)
    Friday, May 04, 2007 10:47 AM
  •  

    Spot on, clicked on Compatibility Files and there it was.  Thanks!!

     

     

     

    Tuesday, May 08, 2007 1:29 PM
  •  SayWhat wrote:

     

    I've just got my new Vista laptop and am having trouble with folder properties. I'm logged in as Adminstrator because I'm the only user and its not connected to the internet, yet.

    I right-click on a folder to bring up the Properties dialog. In the General tab Attributes is set to Read-only. I click on the blue box to unset this and click on OK to close the dialog. When I right-click and bring up the dialog again the Read-only attribute is still set????

    How can I permanently unset the Read-only attribute?, for folders and files.

     

     

     

     

     


     

    Thursday, May 29, 2008 2:22 AM
  •  I'm also using a program that needs write access to the program files directory. Is there any way to allow this? I get a message that only the administrator can do this, but I am the administrator on my PC. Is this just a security feature that can be disabled? My program won't allow my to exit without writing to a log.
    Thanks!
    Tuesday, February 24, 2009 2:46 PM
  • yae I have security tab but  now what you never told him how to use the security tab you told him how to use command line tools
    Sunday, June 21, 2009 6:46 AM