<?xml version="1.0" encoding="UTF-8"?>
<rss version="2.0"
	xmlns:content="http://purl.org/rss/1.0/modules/content/"
	xmlns:wfw="http://wellformedweb.org/CommentAPI/"
	xmlns:dc="http://purl.org/dc/elements/1.1/"
	xmlns:atom="http://www.w3.org/2005/Atom"
	xmlns:sy="http://purl.org/rss/1.0/modules/syndication/"
	xmlns:slash="http://purl.org/rss/1.0/modules/slash/"
	>

<channel>
	<title>Brad&#039;s Tech Blog &#187; NTFS</title>
	<atom:link href="http://bradstechblog.com/category/ntfs/feed" rel="self" type="application/rss+xml" />
	<link>http://bradstechblog.com</link>
	<description>Microsoft technologies like: System Center Operations Manager, and whatever else comes up at the office.</description>
	<lastBuildDate>Sat, 13 Feb 2010 01:59:12 +0000</lastBuildDate>
	<generator>http://wordpress.org/?v=2.9.2</generator>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
			<item>
		<title>Modify NTFS permissions without replacing ACLs with Xcalcs.exe</title>
		<link>http://bradstechblog.com/microsoft-windows-server/modify-ntfs-permissions-without-replacing-acls-with-xcalcsexe</link>
		<comments>http://bradstechblog.com/microsoft-windows-server/modify-ntfs-permissions-without-replacing-acls-with-xcalcsexe#comments</comments>
		<pubDate>Wed, 03 Sep 2008 15:55:45 +0000</pubDate>
		<dc:creator>Brad Hearn</dc:creator>
				<category><![CDATA[Microsoft windows server]]></category>
		<category><![CDATA[NTFS]]></category>
		<category><![CDATA[Script]]></category>
		<category><![CDATA[Modify]]></category>
		<category><![CDATA[permissions]]></category>
		<category><![CDATA[Xcacls]]></category>

		<guid isPermaLink="false">http://bradstechblog.com/?p=171</guid>
		<description><![CDATA[Xcacls is used to modify NTFS permissions without replacing existing ACLs. This allows you to hit individual files, folders, or entire directories. The tool is very easy and can do all this with a single line of code.]]></description>
			<content:encoded><![CDATA[<p>Xcacls is used to modify NTFS permissions without replacing existing ACLs. This allows you to hit individual files, folders, or entire directories. The tool is very easy and can do all this with a single line of code.</p>
<p>While I was at a clients I came across some user folders that never had the proper NTFS rights assigned at setup. Subsequently they all had the default local users group assigned to them with read and execute. This effectively gave all users access to all folder. To make this even harder to resolve, someone had also removed the inheritance check mark and copied all the permissions. This now means that the only way to remove the ACL from the GUI is by removing it individually on each folder and file. Not a good solution considering there are over 4000 users. So time to use a script.</p>
<p>First you will need to download Xcacls.</p>
<p>Search Google for Xcacls, or for KB825751, or click on the link below</p>
<p><a href="http://www.microsoft.com/downloads/details.aspx?FamilyID=0ad33a24-0616-473c-b103-c35bc2820bda&amp;displaylang=en" target="_blank">http://www.microsoft.com/downloads/details.aspx?FamilyID=0ad33a24-0616-473c-b103-c35bc2820bda&amp;displaylang=en</a></p>
<p><!-smartads-></p>
<p><span id="more-171"></span></p>
<p>Install Xcacls on the server first.</p>
<ol>
<li>Double click on XCacls_Installer.exe</li>
<li>you will be asked for a path to extract to. I choose C:\</li>
<li>This will Extract a single file c:\xcacls.vbs</li>
</ol>
<p>Get ready to run the script</p>
<ol>
<li>Open a Command window and navigate to the root of C</li>
<li>Xcacls is is used with cscript.</li>
<li>Lets do an easy test and at the command prompt type
<ol>
<li>cscript xcacls.vbs</li>
</ol>
</li>
<li>If you see the related switch&#8217;s then you have done this step correct.</li>
</ol>
<blockquote><p>Run Xcacls to modify your permisions. Make sure you have a full backup first. And make sure your backups include ACLs.</p></blockquote>
<p><!--[if gte mso 9]><xml> <w:WordDocument> <w:View>Normal</w:View> <w:Zoom>0</w:Zoom> <w:PunctuationKerning /> <w:ValidateAgainstSchemas /> <w:SaveIfXMLInvalid>false</w:SaveIfXMLInvalid> <w:IgnoreMixedContent>false</w:IgnoreMixedContent> <w:AlwaysShowPlaceholderText>false</w:AlwaysShowPlaceholderText> <w:Compatibility> <w:BreakWrappedTables /> <w:SnapToGridInCell /> <w:WrapTextWithPunct /> <w:UseAsianBreakRules /> <w:DontGrowAutofit /> </w:Compatibility> <w:BrowserLevel>MicrosoftInternetExplorer4</w:BrowserLevel> </w:WordDocument> </xml><![endif]--><!--[if gte mso 9]><xml> <w:LatentStyles DefLockedState="false" LatentStyleCount="156"> </w:LatentStyles> </xml><![endif]--><!--  /* Style Definitions */  p.MsoNormal, li.MsoNormal, div.MsoNormal 	{mso-style-parent:""; 	margin:0in; 	margin-bottom:.0001pt; 	mso-pagination:widow-orphan; 	font-size:12.0pt; 	font-family:"Times New Roman"; 	mso-fareast-font-family:"Times New Roman";} @page Section1 	{size:8.5in 11.0in; 	margin:1.0in 1.25in 1.0in 1.25in; 	mso-header-margin:.5in; 	mso-footer-margin:.5in; 	mso-paper-source:0;} div.Section1 	{page:Section1;} --><!--[if gte mso 10]> <mce:style><!   /* Style Definitions */  table.MsoNormalTable 	{mso-style-name:"Table Normal"; 	mso-tstyle-rowband-size:0; 	mso-tstyle-colband-size:0; 	mso-style-noshow:yes; 	mso-style-parent:""; 	mso-padding-alt:0in 5.4pt 0in 5.4pt; 	mso-para-margin:0in; 	mso-para-margin-bottom:.0001pt; 	mso-pagination:widow-orphan; 	font-size:10.0pt; 	font-family:"Times New Roman"; 	mso-ansi-language:#0400; 	mso-fareast-language:#0400; 	mso-bidi-language:#0400;} --> <!--[endif]--></p>
<p class="MsoNormal">Examples of the line</p>
<blockquote>
<p class="MsoNormal">c:\cscript xcacls.vbs G:\user folder /t /e /f /s /r users /l c:\aclchange_log.txt</p>
<p class="MsoNormal">or</p>
<p class="MsoNormal"><!--[if gte mso 9]><xml> <w:WordDocument> <w:View>Normal</w:View> <w:Zoom>0</w:Zoom> <w:PunctuationKerning /> <w:ValidateAgainstSchemas /> <w:SaveIfXMLInvalid>false</w:SaveIfXMLInvalid> <w:IgnoreMixedContent>false</w:IgnoreMixedContent> <w:AlwaysShowPlaceholderText>false</w:AlwaysShowPlaceholderText> <w:Compatibility> <w:BreakWrappedTables /> <w:SnapToGridInCell /> <w:WrapTextWithPunct /> <w:UseAsianBreakRules /> <w:DontGrowAutofit /> </w:Compatibility> <w:BrowserLevel>MicrosoftInternetExplorer4</w:BrowserLevel> </w:WordDocument> </xml><![endif]--><!--[if gte mso 9]><xml> <w:LatentStyles DefLockedState="false" LatentStyleCount="156"> </w:LatentStyles> </xml><![endif]--><!--  /* Style Definitions */  p.MsoNormal, li.MsoNormal, div.MsoNormal 	{mso-style-parent:""; 	margin:0in; 	margin-bottom:.0001pt; 	mso-pagination:widow-orphan; 	font-size:12.0pt; 	font-family:"Times New Roman"; 	mso-fareast-font-family:"Times New Roman";} @page Section1 	{size:8.5in 11.0in; 	margin:1.0in 1.25in 1.0in 1.25in; 	mso-header-margin:.5in; 	mso-footer-margin:.5in; 	mso-paper-source:0;} div.Section1 	{page:Section1;} --><!--[if gte mso 10]> <mce:style><!   /* Style Definitions */  table.MsoNormalTable 	{mso-style-name:"Table Normal"; 	mso-tstyle-rowband-size:0; 	mso-tstyle-colband-size:0; 	mso-style-noshow:yes; 	mso-style-parent:""; 	mso-padding-alt:0in 5.4pt 0in 5.4pt; 	mso-para-margin:0in; 	mso-para-margin-bottom:.0001pt; 	mso-pagination:widow-orphan; 	font-size:10.0pt; 	font-family:"Times New Roman"; 	mso-ansi-language:#0400; 	mso-fareast-language:#0400; 	mso-bidi-language:#0400;} --> <!--[endif]--></p>
<p class="MsoNormal">cscript xcacls.vbs G:\all users\user folder /t /e /f /s /r users /l c:\aclchange_log.txt</p>
<p class="MsoNormal">
<p class="MsoNormal">Remove the /t and /f switch to only change the root folder and one sub folder level down.</p>
</blockquote>
<p class="MsoNormal">
<p class="MsoNormal">
<p><!--[if gte mso 9]><xml> <w:WordDocument> <w:View>Normal</w:View> <w:Zoom>0</w:Zoom> <w:PunctuationKerning /> <w:ValidateAgainstSchemas /> <w:SaveIfXMLInvalid>false</w:SaveIfXMLInvalid> <w:IgnoreMixedContent>false</w:IgnoreMixedContent> <w:AlwaysShowPlaceholderText>false</w:AlwaysShowPlaceholderText> <w:Compatibility> <w:BreakWrappedTables /> <w:SnapToGridInCell /> <w:WrapTextWithPunct /> <w:UseAsianBreakRules /> <w:DontGrowAutofit /> </w:Compatibility> <w:BrowserLevel>MicrosoftInternetExplorer4</w:BrowserLevel> </w:WordDocument> </xml><![endif]--><!--[if gte mso 9]><xml> <w:LatentStyles DefLockedState="false" LatentStyleCount="156"> </w:LatentStyles> </xml><![endif]--><!--  /* Style Definitions */  p.MsoNormal, li.MsoNormal, div.MsoNormal 	{mso-style-parent:""; 	margin:0in; 	margin-bottom:.0001pt; 	mso-pagination:widow-orphan; 	font-size:12.0pt; 	font-family:"Times New Roman"; 	mso-fareast-font-family:"Times New Roman";} @page Section1 	{size:8.5in 11.0in; 	margin:1.0in 1.25in 1.0in 1.25in; 	mso-header-margin:.5in; 	mso-footer-margin:.5in; 	mso-paper-source:0;} div.Section1 	{page:Section1;} --><!--[if gte mso 10]> <mce:style><!   /* Style Definitions */  table.MsoNormalTable 	{mso-style-name:"Table Normal"; 	mso-tstyle-rowband-size:0; 	mso-tstyle-colband-size:0; 	mso-style-noshow:yes; 	mso-style-parent:""; 	mso-padding-alt:0in 5.4pt 0in 5.4pt; 	mso-para-margin:0in; 	mso-para-margin-bottom:.0001pt; 	mso-pagination:widow-orphan; 	font-size:10.0pt; 	font-family:"Times New Roman"; 	mso-ansi-language:#0400; 	mso-fareast-language:#0400; 	mso-bidi-language:#0400;} --> <!--[endif]--></p>
<blockquote>
<p class="MsoNormal"><span> </span><span style="color: red;"><span> </span>/F<span> </span>[Used with Directory or Wildcard] This will change all</span></p>
<p class="MsoNormal"><span style="color: red;"><span> </span>files under the inputed directory but will NOT</span></p>
<p class="MsoNormal"><span style="color: red;"><span> </span>traverse sub directories unless /T is also present.</span></p>
<p class="MsoNormal"><span style="color: red;"><span> </span>If filename is a directory, and /F is not used, no</span></p>
<p class="MsoNormal"><span style="color: red;"><span> </span>files will be touched.</span></p>
</blockquote>
<p class="MsoNormal">
<blockquote>
<p class="MsoNormal"><span style="color: red;"><span> </span>/S<span> </span>[Used with Directory or Wildcard] This will change all</span></p>
<p class="MsoNormal"><span style="color: red;"><span> </span>sub folders under the inputed directory but will NOT</span></p>
<p class="MsoNormal"><span style="color: red;"><span> </span>traverse sub directories unless /T is also present.</span></p>
<p class="MsoNormal"><span style="color: red;"><span> </span>If filename is a directory, and /S is not used, no</span></p>
<p class="MsoNormal"><span style="color: red;"><span> </span>sub directories will be touched.</span></p>
</blockquote>
<p class="MsoNormal">
<blockquote>
<p class="MsoNormal"><span> </span><span style="color: red;">/T<span> </span>[Used only with a Directory] Traverses each</span></p>
<p class="MsoNormal"><span style="color: red;"><span> </span>subdirectory and makes the same changes.</span></p>
<p class="MsoNormal"><span style="color: red;"><span> </span>This switch will traverse directories only if the</span></p>
<p class="MsoNormal"><span style="color: red;"><span> </span>filename is a directory or is using wildcards.</span></p>
</blockquote>
<p class="MsoNormal"><span style="color: red;"> </span></p>
<blockquote>
<p class="MsoNormal"><span> </span><span style="color: red;">/E<span> </span>Edit ACL instead of replacing it.</span></p>
<p class="MsoNormal"><span style="color: red;"> </span></p>
<p class="MsoNormal"><span> </span>/<span style="color: red;">R user<span> </span>Revoke specified user&#8217;s access rights.</span></p>
<p class="MsoNormal"><span style="color: red;"><span> </span>(Will remove any Allowed or Denied ACL&#8217;s for user)</span></p>
</blockquote>
<p class="MsoNormal"><span style="color: red;"> </span></p>
<blockquote>
<p class="MsoNormal"><span> </span><span style="color: red;"><span> </span>/L filename<span> </span>Filename for Logging. This can include a path name</span></p>
<p class="MsoNormal"><span style="color: red;"><span> </span>if the file isn&#8217;t under the current directory.</span></p>
<p class="MsoNormal"><span style="color: red;"><span> </span>File will be appended to, or created if it doesn&#8217;t</span></p>
<p class="MsoNormal"><span style="color: red;"><span> </span>exit. Must be Text file if it exists or error will occur.</span></p>
<p class="MsoNormal"><span style="color: red;"><span> </span>If filename is obmitted the default name of XCACLS will</span></p>
<p class="MsoNormal"><span style="color: red;"><span> </span><span> </span>be used.</span></p>
</blockquote>
<p>I hope this helps. Post with questions if you would like more info.</p>
]]></content:encoded>
			<wfw:commentRss>http://bradstechblog.com/microsoft-windows-server/modify-ntfs-permissions-without-replacing-acls-with-xcalcsexe/feed</wfw:commentRss>
		<slash:comments>1</slash:comments>
		</item>
	</channel>
</rss>
