Remove read-only attribute from folder after Windows reinstall

11

6

I reinstalled a fresh copy of Windows 8.1 on my laptop after formatting drive C. Then I tried to access my Photos folder on drive D and got the error

Access is denied

It turned my folder into a Read Only folder. All other folders on the drive work normally.

I tried using Command Prompt to remove the Read Only attribute but the error message still appears. I tried doing it the simple way (right-click and so on) but the option to change the folder properties from read-only doesn't even appear.

How do I access the folder on my D drive?

shiva86

Posted 2014-11-28T16:26:54.953

Reputation: 113

1Read-only folders can still be accessed but not modified. Is that the case? Are you able to at least get a directory listing with dir /b Photos? – Tymric – 2014-11-28T16:32:27.027

Hi Timmy! nope, it doesn't work. It says: file not found. I cannot access the folder in any way – shiva86 – 2014-11-28T16:42:22.187

Answers

18

The problem isn't that the folder is Read Only. Rather, because your folder was created on a different installation of Windows you no longer have NTFS security permissions to access (read) the folder.

Correct this by following these steps to take ownership and then grant yourself full access to the folder.

  1. Right-click the folder > Properties
  2. Security tab > Advanced
  3. Click Change to the right of Owner
  4. Enter Users into box and click OK
  5. Enable the checkbox Replace owner on subcontainers and objects then click Apply
  6. If prompted that You do not have permissions to read... click Yes
  7. Completely close out of the Advanced Security Settings dialog
  8. Right-click the folder > Properties
  9. Security tab > Edit...
  10. Add...
  11. Enter Users into box and click OK
  12. Enable the Full Control checkbox then click OK

I say Reinstate Monica

Posted 2014-11-28T16:26:54.953

Reputation: 21 477

In step 5.) apart from the mentioned checkbox I also had to tick the checkbox at the bottom of the 'Permissions' tab in 'Advanced Security Settings' in order to be able to recursively change the Read-only permission later.

The box says: "Replace all child object permission entries with inheritable permissions entries from this object". – G.Rassovsky – 2016-07-20T14:41:25.437

2

Do this in CMD as admin

for the folder

attrib -r c:\my-folder

and the files

attrib -r c:\my-folder\*.*

It did the job. I was having issue with PhpStorm. It wasn't able to save the project files because of the read-only status. After doing this in CMD as admin, all is well.

I posted this in Microsoft forum as well - http://answers.microsoft.com/en-us/windows/forum/windows_8-files/in-windows-8-x64-can-not-remove-read-only/81ed233f-9149-4881-bb15-cf0e1ca150e3

Anuj

Posted 2014-11-28T16:26:54.953

Reputation: 21

0

Easily done with PowerShell for all sub-files and folders:

ls -r c:\folder | % { attrib -r $_.FullName }

Where aliases:

ls > Get-ChildItem

% > ForEach-Object

Ivan Temchenko

Posted 2014-11-28T16:26:54.953

Reputation: 101

0

This could be due to some permission issue with the user profile after you re-installed the OS

Try to change the permission at Advanced Security Properties. Try these steps and check your outcome.

Right the Folder > Properties > Security tab > select "Authenticated Users" > click on Advanced > click on "Change Permissions" > 'Add' the user in topic > Add the User and click on "Full Control" check box > click OK.

This will help you to resolve the issue.

vembutech

Posted 2014-11-28T16:26:54.953

Reputation: 5 693