2012-05-10

Fixing file permissions on Windows

Access is Denied

I have been having issues cleaning up my hard drive because of files with weird permission settings.  I had endless "Access is Denied" messages and could not delete the files from the Command Prompt or Windows Explorer even with elevation to Administrator rights.

GUI Failure

I have long ago given up on the Windows Security Dialogs.  They are trying to simplify a system so complicated that you cannot make it understandable.  Look to the right for an example.  Three nested dialogs and a popup that contains too much information.  At this point you can only guess which option is right.  Add to it the confusion of inherited permissions and file vs folder permissions and you simply have no chance of doing the right thing.

The solution

Is to find a folder up in your folder hierarchy that has the right permissions and apply that.  Step 1 is to run a command prompt as administrator:
cd to the folder that has the right permssions (cd c:\stuff in my case) and issue this command:
icacls broken /reset /t /c /l /q
As shown in this image:
And everything should be working again.


No comments:

Backup your PostgreSQL database on Kubernetes

I did not find any out of the box solution so I created my own.  Please see the Github Readme page for more information: postgresql-backup-s...