Archive

Last modified by Victor Zhang on 16:38, 07/04/2020

Blog - posts for May 2021

CHKDSK Breaks NTFS permission

After a chkdsk /r /f /v, the chkdsk messed a lot of folder permissions.

The first to notice is OneDrive and Google Drive

The GUI of windows explorer is not capable of reclaiming ownership of folder, which led me to delete the folder in Administrator CMD (Terminal) and re-syncing them. It took a while until I realised it was the wrong approach.

If admin terminal can access them, the files are actually not corrupt. After a bit more searching, I found that using admin terminal is able to reset NTFS previliage. Reason being a lot of other software  installations were broken, as I can't reinstall them and lose all the settings.

Reset NTFS privilage
ICACLS <directory> /T /Q /C /RESET

In the Command:

/T : indicates that this operation is performed on all matching files/directories below the directories specified in the name.
/Q: indicates that icacls should suppress success messages.
/C: indicates that this operation will continue on all file errors. Error messages will still be displayed.
/RESET: resets the previliage

Reference: How to reset NTFS permissions with ICACLS

Tags:
Created by Victor Zhang on 23:50, 28/01/2005

Recently Visited