Icacls Command regaining Permission by Administrator and Everyone

icaclswindows-server-2012windows-server-2012-r2

Accidentally I gave Deny permission to 'Everyone' folder which points to my website. I am using Windows 2012.

Now I get access denied for Administrator and Website shows 500 error.

Can anyone give any icacls command how 'Administrator' get back access to Website D:\website\mysite and 'Everyone' can read/execute the site.

Following the answer It worked to pull up the site once Again. Now I am facing a New Challenge
1. To Certain Image Folders only "Administrator" has access no one else. !!
Means NETWORK SERVICES, SYSTEM, ADMINISTRATORS,USERS are not in the Security List.
Image Folder Permission Screen Shot

Can Anyone say How we Include these Access List to the Specified Folders, Please ?

Best Answer

You may need to take ownership of the directory before you can change permissions on it:

takeown /f D:\website\mysite /r /d y

(That's /r for recursive, and /d for default answer of y for yes.)

Then you should hopefully be able to run something like:

icacls  D:\website\mysite\*.*  /remove:d everyone /T
Related Topic