• We’re currently investigating an issue related to the forum theme and styling that is impacting page layout and visual formatting. The problem has been identified, and we are actively working on a resolution. There is no impact to user data or functionality, this is strictly a front-end display issue. We’ll post an update once the fix has been deployed. Thanks for your patience while we get this sorted.

How to reset ownership/permissions for entire hard drive?

Trevelyan

Diamond Member
I'm not sure how this happened, but my hard drive which stores My Documents has gotten all of the owner and permissions messed up. Certain folders I can't rename or delete because I get permission denied errors.

I've tried to take ownership, and then add permissions for my user, but it's all messed up. Is there any script or program that can just do this for me?
 
I've seen a bad profile with Admin rights causes a problem that looked like permissions were all messed up. Recreating the admin account profile fixed it.
 
Right click on My Documents -> properties -> security tab -> advanced button -> owner tab -> Select your account -> check the "replace owner on subcontainers and objects" box -> OK button.
 
I've used the script below before. It calls CACLS, a MS tool.

Warning: Provided as is without warranty expressed or implied. Use at own risk.

Function SetPermissions()
Dim strHomeFolder, strHome, strUser
Dim intRunError, objShell, objFSO

strHomeFolder = "C:\Test"

Set objShell = CreateObject("Wscript.Shell")
Set objFSO = CreateObject("Scripting.FileSystemObject")
If objFSO.FolderExists(strHomeFolder) Then
intRunError = objShell.Run("%COMSPEC% /c Echo Y| cacls " _
& strHomeFolder & " /e /c /g everyone:F ", 2, True)

If intRunError <> 0 Then
Wscript.Echo "Error assigning permissions for user " _
& strUser & " to home folder " & strHomeFolder
End If
End If
End Function

or, just do as TheKub says.
 
Back
Top