XCACLS, SUNINACL, As well as other Permissions Security Recovery Tools

XCACLS, SUNINACL, As well as other Permissions Security Recovery Tools

1000

Summary:
An article about tips on how to use XCACLS and SUNINACL to recovery and set Permissions Security on files and directories pretty easily

Keywords and phrases:
XCACLS, SUNINACL, CACLS, permissions security, perms, chmod, Domain Permissions, attrib, rapidly permissions recovery, lost file permissions

You have 50GB Of Information To Move As well as Permissions Security
—————————-
This article is about a number of tools that may save a Windows administrators you know what inside the occasion of a large scale permissions security difficulty.

Here can be a fictional scenario we are able to use to illustrate the use with the XCACLS tool. We must move or copy 50GB worth of data that is comprised of various thousand directories containing hundreds of a large number of small files from a single storage program to one more. These systems occur to a part of a Windows 2000 Domain and permissions are rather granular in definition. We begin the replication of that information applying a favorite replication or synchronization tool and walk away for the evening. When we return the following day, every little thing has copied and all looks nicely. That’s until you try to access the data.

The Data Is Copied, But I Can’t Access It: Permissions Security Difficulty
————————————————–
What you didn’t know, till just now, is that the root directory of the drive that you just copied the data to had the wrong permissions assigned to it. Furthermore, inheritance was configured such that any information which is placed on the drive is more than written with the permissions with the root directory. Within this situation, it was an old account that no longer existed. Think it or not, that will come about, and technique administrators will know what I’m speaking about. Now that you are left with wanting to determine what to complete. Do I format the new drive, adjust the permissions and inheritance on the root directory so they are right and begin all over yet again? Do I make the adjustments on the root drive so they have the right permissions and wait hours upon hours for the permissions to propagate? No, there is one more, quite quickly way of resolving this problem with XCACLS or one more tool known as SUBINACL.

XCALCS Speedily Resets Permissions On Directories And Files
—————————-
Becasue I have limited space in this report, I am going to work with XCACLS because the tool to appropriate this challenge. Even so, in complicated permissions structures, you may probably wish to use SUBINACL to fix the problem. I will speak about SUBINACL briefly at the finish of your post.

XCACLS as an extremely rapidly tool that will set, take away, add, and change permissions on files and directories. For intance, the following command replaces all existing access rights and accounts with that of “dmiller” on the file “file.txt” with read-only access: “xcalcs file.txt /Y /T /G domaindmiller:r”. While that is definitely fairly simple and helpful, what about altering all my directories and files, which I have a large number of, to permit the domaindmiller account to possess complete access? To perform this in a quite quickly fashion you can execute the following from the root directory of your drive: “for /d %g IN (*.*) DO xcacls “%g” /Y /T /G domaindmiller:f”. This can go through just about every directory, subdirectory, and file and replace the present permissions with dmiller getting complete access to the object. You will notice I put “” around the %g within the instance. This is not expected, but if you have directories which have names with spaces in them you’ll need to possess the “”.

What Other Strategies Can I Use XCACLS To Alter Security Permissions
———————————————————-
To offer you a few additional handy examples of how it is possible to use this tool check out the comply with command prompt procedures for replacing, updating and removing accounts and permissions from huge numbers of directories and files.

The following command replaces all current access rights an accounts with that of dmiller with read only access rights:
for /d %g IN (*.*) DO xcacls “%g” /Y /T /G domaindmiller:r

The following command does not replace current account permissions, instead, it adds the account, within the instance the local admin account, with read only permissions:
for /d %g IN (*.*) DO xcacls “%g” /Y /E /T /G administrator:r

The following command removes the account “administrator” permissions from all directories, files, and subdirectories: for /d %g IN (*.*) DO xcacls “%g” /Y /E /T /R administrator

This command should really update all the directories and their contents to enable Domain Admins complete access:
for /d %g IN (*.*) DO xcacls “%g” /Y /T /G “Domain Admins:f”

I did a test on my XP Pro workstation and was in a position to change the permissions on roughly 10000 directories and files in less 1 minute. On 1 of my servers I was able to attain a 500% boost in speed. It can be blazingly rapidly.

SUBINACL Is Far more Complicated But Man Can It Seriously Save The Day
———————————————–
I can’t go into specifics about this tool in this article but I will let you know what it may do. And once more, it does it pretty quite fast. Applying the identical scenario as above, let’s say that you had to fix the permissions on thousands of house directories. With SUBINACL, it is possible to basically go to the original directories and files, use the tool to create what is called a “play file”, a text file that contains the proper account and permissions from the source files, then use that same file to inform SUBINACL to fix the permissions on the target storage program, the one with the screwed up permissions. It is fairly the life saver in the event you ever find oneself within the kind of predicament.

Also have a look at “CACLS”. This command is inherent to Windows XP Professional.

Conclusion
———-
These tools are contained inside the Windows 2000 and 2003 server resource tool kit, on the other hand a number of of them also exist native for the Windows XP environment. Examine them out when you don’t currently know about them. Even if you have no use for them ideal now it may well save you hours of tough perform and pressure within the occasion of a future permissions challenge.

You could reprint or publish this short article free of charge as long as the bylines are included.

Original URL (The Internet version of the post)
————
defendingthenet.com/NewsLetters/XCACLS-SUBINACL-AndOtherPermissionSecurityRecoveryTools.htm