Strict Standards: Non-static method AL_HELPER::SetupPaths() should not be called statically in /home/software/public_html/windowsxp/init.php on line 15
Reset Security on all folders

Still have a problem? Ask for help at our discussion forum.

Advanced Search
Article Options
Popular Articles
  1. Handwrite for MSN Messenger
  2. Win2000 Logon Screen
  3. The difference between 64 and 32 bit processors
  4. Windows XP FAQ T
  5. Windows XP FAQ P
No popular articles found.

 »  Home  »  Security  »  Reset Security on all folders
Reset Security on all folders
By  Super Admin  | Published  02/25/2005 | Security | Unrated
Reset Security on all folders

This is in fact a less than optimum method of applying security settings. A more appropriate method is to execute the following command line from the root of the partition:

(Note: If you are not at the root of the partition in question you must set your default there: CD /D drive_name: )

Now the command line:
CACLS * /e /t /c /g Administrators:F System:F

(Note: If you see the message, ''Unable to perform a security operation on an object which has no associated security,'' you are executing this from a FAT partition. You must set the default to an NTFS partition.)

This command will edit (/e) the ACLs, rather than replace them, and recursively apply them (/t) to subdirectories. CACLS will continue (/c) even when it hits an open file. Any number of ACCOUNT:PERM parameters may follow the grant (/g) switch. There is additional flexibility built into the CACLS command-its only limitation is the dearth of selections for PERM (permission levels) values.

How would you rate the quality of this article?
1 2 3 4 5
Poor Excellent
Tell us why you rated this way (optional):

Send to Author Post on Site

  • Comment #1 (Posted by an unknown user)
    I was searching for such a function in windows. Couldn't find it. Now u have found it 4 me.
  • Comment #2 (Posted by an unknown user)
    please provide more information on what it exactly do, it sounds good so thanks anyway :)
  • Comment #3 (Posted by an unknown user)
    very helpful for details just enter the command CACLS at the command prompt and you will get this: C:UsersAdministrator>cacls Displays or modifies access control lists (ACLs) of files CACLS filename [/T] [/M] [/S[:SDDL]] [/E] [/C] [/G user:perm] [/R user [...]] [/P user:perm [...]] [/D user [...]] filename Displays ACLs. /T Changes ACLs of specified files in the current directory and all subdirectories. /M Changes ACLs of volumes mounted to a directory /S Displays the SDDL string for the DACL. /S:SDDL Replaces the ACLs with those specified in the SDDL string (not valid with /E, /G, /R, /P, or /D). /E Edit ACL instead of replacing it. /C Continue on access denied errors. /G user:perm Grant specified user access rights. Perm can be: R Read W Write C Change (write) F Full control /R user Revoke specified user's access rights (only valid with /E). /P user:perm Replace specified user's access rights. Perm can be: N None R Read W Write C Change (write) F Full control /D user Deny specified user access. Wildcards can be used to specify more that one file in a command. You can specify more than one user in a command. Abbreviations: CI - Container Inherit. The ACE will be inherited by directories. OI - Object Inherit. The ACE will be inherited by files. IO - Inherit Only. The ACE does not apply to the current file/directory.
  • Comment #4 (Posted by an unknown user)
    CACLS * /e /t /c /g Administrators:F System:F Are you changing drive F:???? what if I want a different drive say C: should I use CACLS * /e /t /c /g Administrators:C System:C What if I just need to reset a folder do I use CACLS * /e /t /c /g Administrators:F:My Folder System:F:My Folder This is as clear as mud
  • Comment #5 (Posted by no)
    Anyone who can understand these instructions had enough experience before reading it to know what to do already. I'm an experienced computer user, but not when it comes to windows security/permissions. If someone would be so kind as to break down what each section of that code syntax is doing, it would be of great use to the 95% who came looking for a solution to their problem, but didn't have enough information to put it to use on their own system.
  • Comment #6 (Posted by an unknown user)
    thank u worked
  • Comment #7 (Posted by an unknown user)
    using paragon partition manager 8.5 to replace $security in root of any ntfs partition with a blank file, Will remove any permissions (and will not result in any errors) the command u suggested, it seems to not to work with vista (aka when it is installed & then manually deleted) (i had xp issues at the time. the command says: the filename, directory name, or volume name syntax is invalid- p.s comment#3 person, its not drive letters where F is typed, aka if u goto c: then type that, it should use that drive f must mean something else
  • Comment #8 (Posted by an unknown user)
    The F in the command line is F for Full access, google for "cacls" or see if you need to understand the syntax.
  • Comment #9 (Posted by an unknown user)
    If I was a complete idiot, and revoked even system and admin priviledges from a folder, so that CACLS would return ACCESS DENIED on any attempt to alter the settings, is there any way to reset the default?
  • Comment #10 (Posted by victor_zhuang)
    I use command cacls "CACLS F:cover /G everyone:F" the message reply "Access denied" so how should I do?
  • Comment #11 (Posted by an unknown user)
    Thanks! Also, please ignore noob comments aka 'clear as mud' one -- they are from idiots who will rate this advice 1/5 just because they have no clue what it does. :)
Submit Comment