<?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>Bryan Geraghty &#187; ACL</title>
	<atom:link href="http://bryan.ravensight.org/tag/acl/feed/" rel="self" type="application/rss+xml" />
	<link>http://bryan.ravensight.org</link>
	<description>Music, Photography, Security, and Programming</description>
	<lastBuildDate>Sat, 06 Aug 2011 21:18:01 +0000</lastBuildDate>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.org/?v=3.0.4</generator>
		<item>
		<title>Linux ACL Management Functions</title>
		<link>http://bryan.ravensight.org/2010/01/linux-acl-management-functions/</link>
		<comments>http://bryan.ravensight.org/2010/01/linux-acl-management-functions/#comments</comments>
		<pubDate>Thu, 07 Jan 2010 22:07:32 +0000</pubDate>
		<dc:creator>Bryan</dc:creator>
				<category><![CDATA[Programming]]></category>
		<category><![CDATA[Security]]></category>
		<category><![CDATA[ACL]]></category>
		<category><![CDATA[Linux]]></category>
		<category><![CDATA[Permissions]]></category>
		<category><![CDATA[Tips]]></category>

		<guid isPermaLink="false">http://bryan.ravensight.org/?p=164</guid>
		<description><![CDATA[Traditional file system permissions management in Linux leaves most users wanting. Fortunately, there&#8217;s a feature that most linux users don&#8217;t even know about called ACLs and it&#8217;s most likely already available on your system. All you have to do to enable it is add the `acl` option to your volume in `/etc/fstab` and re-mount the [...]]]></description>
			<content:encoded><![CDATA[<p>Traditional file system permissions management in Linux leaves most users wanting. Fortunately, there&#8217;s a feature that most linux users don&#8217;t even know about called ACLs and it&#8217;s most likely already available on your system. All you have to do to enable it is add the `acl` option to your volume in `/etc/fstab` and re-mount the volume.</p>
<p>Once that is done, here are some functions that I wrote to help manage these ACLs.</p>
<p>Here is an example of a command that grants apache permission to read a directory with these functions:</p>

<div class="wp_syntax"><div class="code"><pre class="bash" style="font-family:monospace;">$ <span style="color: #7a0874; font-weight: bold;">source</span> aclfunctions.bash; grantUserRead <span style="color: #ff0000;">'apache'</span> <span style="color: #000000; font-weight: bold;">/</span>var<span style="color: #000000; font-weight: bold;">/</span>www <span style="color: #ff0000;">'*'</span>;</pre></div></div>

<p>aclfunctions.bash:</p>

<div class="wp_syntax"><div class="code"><pre class="bash" style="font-family:monospace;"><span style="color: #666666; font-style: italic;"># Author :: Bryan Geraghty</span>
<span style="color: #666666; font-style: italic;"># Date :: 2009-10-28</span>
<span style="color: #666666; font-style: italic;"># Notes :: ACL management functions</span>
&nbsp;
<span style="color: #666666; font-style: italic;">##</span>
<span style="color: #666666; font-style: italic;"># Resets permissions on all files and directories in the specified path and removes</span>
<span style="color: #666666; font-style: italic;"># and ACL entries</span>
<span style="color: #666666; font-style: italic;">#</span>
<span style="color: #666666; font-style: italic;"># @param string $2 Base path Path in which all operations will take place</span>
<span style="color: #666666; font-style: italic;">#</span>
<span style="color: #000000; font-weight: bold;">function</span> resetAll
<span style="color: #7a0874; font-weight: bold;">&#123;</span>
   <span style="color: #7a0874; font-weight: bold;">echo</span> <span style="color: #ff0000;">&quot;Resetting permissions on all files in directory $1&quot;</span>;
&nbsp;
   <span style="color: #7a0874; font-weight: bold;">echo</span> <span style="color: #ff0000;">&quot;Removing ACLs...&quot;</span>;
   setfacl <span style="color: #660033;">-Rb</span> <span style="color: #007800;">$1</span>;
&nbsp;
   <span style="color: #7a0874; font-weight: bold;">echo</span> <span style="color: #ff0000;">&quot;Resetting directories...&quot;</span>;
   <span style="color: #c20cb9; font-weight: bold;">find</span> <span style="color: #007800;">$1</span> <span style="color: #660033;">-type</span> d <span style="color: #660033;">-exec</span> <span style="color: #c20cb9; font-weight: bold;">chmod</span> <span style="color: #000000;">770</span> <span style="color: #7a0874; font-weight: bold;">&#123;</span><span style="color: #7a0874; font-weight: bold;">&#125;</span> \;
&nbsp;
   <span style="color: #7a0874; font-weight: bold;">echo</span> <span style="color: #ff0000;">&quot;Resetting files...&quot;</span>;
   <span style="color: #c20cb9; font-weight: bold;">find</span> <span style="color: #007800;">$1</span> <span style="color: #660033;">-type</span> f <span style="color: #660033;">-exec</span> <span style="color: #c20cb9; font-weight: bold;">chmod</span> <span style="color: #000000;">660</span> <span style="color: #7a0874; font-weight: bold;">&#123;</span><span style="color: #7a0874; font-weight: bold;">&#125;</span> \;
<span style="color: #7a0874; font-weight: bold;">&#125;</span>
&nbsp;
<span style="color: #666666; font-style: italic;">## </span>
<span style="color: #666666; font-style: italic;"># Grants read permissions to all files/folders with names matching $3, which reside</span>
<span style="color: #666666; font-style: italic;"># inside of directory $2, to user $1.</span>
<span style="color: #666666; font-style: italic;">#</span>
<span style="color: #666666; font-style: italic;"># @param string $1 Username The user to whom read permissions will be granted</span>
<span style="color: #666666; font-style: italic;"># @param string $2 Base path Path in which all operations will take place</span>
<span style="color: #666666; font-style: italic;"># @param string $3 Target Name of the file/directory on which to set the permissions</span>
<span style="color: #666666; font-style: italic;">#</span>
<span style="color: #000000; font-weight: bold;">function</span> grantUserRead
<span style="color: #7a0874; font-weight: bold;">&#123;</span>
   <span style="color: #7a0874; font-weight: bold;">echo</span> <span style="color: #ff0000;">&quot;Granting read permission to user $1 on files/folders named $3 in directory $2&quot;</span>;
&nbsp;
   <span style="color: #666666; font-style: italic;">## Set the default permissions for new files on the specified directory</span>
   <span style="color: #7a0874; font-weight: bold;">echo</span> <span style="color: #ff0000;">&quot;Setting defaults...&quot;</span>;
   <span style="color: #c20cb9; font-weight: bold;">find</span> <span style="color: #007800;">$2</span> <span style="color: #660033;">-name</span> <span style="color: #ff0000;">&quot;$3&quot;</span> <span style="color: #660033;">-type</span> d <span style="color: #660033;">-exec</span> setfacl <span style="color: #660033;">-d</span> <span style="color: #660033;">-m</span> u:<span style="color: #007800;">$1</span>:rx <span style="color: #7a0874; font-weight: bold;">&#123;</span><span style="color: #7a0874; font-weight: bold;">&#125;</span> \;
&nbsp;
   <span style="color: #666666; font-style: italic;">## Recusively set the permissions on all existing directories and files within the</span>
   <span style="color: #666666; font-style: italic;">## specified directory</span>
   <span style="color: #7a0874; font-weight: bold;">echo</span> <span style="color: #ff0000;">&quot;Setting directory permissions...&quot;</span>;
   <span style="color: #c20cb9; font-weight: bold;">find</span> <span style="color: #007800;">$2</span> <span style="color: #660033;">-name</span> <span style="color: #ff0000;">&quot;$3&quot;</span> <span style="color: #660033;">-type</span> d <span style="color: #660033;">-exec</span> setfacl <span style="color: #660033;">-R</span> <span style="color: #660033;">-m</span> u:<span style="color: #007800;">$1</span>:rx <span style="color: #7a0874; font-weight: bold;">&#123;</span><span style="color: #7a0874; font-weight: bold;">&#125;</span> \;
&nbsp;
   <span style="color: #666666; font-style: italic;">## Grant permissions to any files with the specified name</span>
   <span style="color: #7a0874; font-weight: bold;">echo</span> <span style="color: #ff0000;">&quot;Setting file permissions...&quot;</span>;
   <span style="color: #c20cb9; font-weight: bold;">find</span> <span style="color: #007800;">$2</span> <span style="color: #660033;">-name</span> <span style="color: #ff0000;">&quot;$3&quot;</span> <span style="color: #660033;">-type</span> f <span style="color: #660033;">-exec</span> setfacl <span style="color: #660033;">-m</span> u:<span style="color: #007800;">$1</span>:r <span style="color: #7a0874; font-weight: bold;">&#123;</span><span style="color: #7a0874; font-weight: bold;">&#125;</span> \;
<span style="color: #7a0874; font-weight: bold;">&#125;</span>
&nbsp;
<span style="color: #666666; font-style: italic;">## </span>
<span style="color: #666666; font-style: italic;"># Grants write permissions to all files/folders with names matching $3, which reside</span>
<span style="color: #666666; font-style: italic;"># inside of directory $2, to user $1.</span>
<span style="color: #666666; font-style: italic;">#</span>
<span style="color: #666666; font-style: italic;"># @param string $1 Username The user to whom read permissions will be granted</span>
<span style="color: #666666; font-style: italic;"># @param string $2 Base path Path in which all operations will take place</span>
<span style="color: #666666; font-style: italic;"># @param string $3 Target Name of the file/directory on which to set the permissions</span>
<span style="color: #666666; font-style: italic;">#</span>
<span style="color: #000000; font-weight: bold;">function</span> grantUserWrite
<span style="color: #7a0874; font-weight: bold;">&#123;</span>
   <span style="color: #7a0874; font-weight: bold;">echo</span> <span style="color: #ff0000;">&quot;Granting write permission to user $1 on files/folders named $3 in directory $2&quot;</span>;
&nbsp;
   <span style="color: #666666; font-style: italic;">## Set the default permissions for new files on the specified directory</span>
   <span style="color: #7a0874; font-weight: bold;">echo</span> <span style="color: #ff0000;">&quot;Setting defaults...&quot;</span>;
   <span style="color: #c20cb9; font-weight: bold;">find</span> <span style="color: #007800;">$2</span> <span style="color: #660033;">-name</span> <span style="color: #ff0000;">&quot;$3&quot;</span> <span style="color: #660033;">-type</span> d <span style="color: #660033;">-exec</span> setfacl <span style="color: #660033;">-d</span> <span style="color: #660033;">-m</span> u:<span style="color: #007800;">$1</span>:rwx <span style="color: #7a0874; font-weight: bold;">&#123;</span><span style="color: #7a0874; font-weight: bold;">&#125;</span> \;
&nbsp;
   <span style="color: #666666; font-style: italic;">## Recusively set the permissions on all existing directories and files within the</span>
   <span style="color: #666666; font-style: italic;">## specified directory</span>
   <span style="color: #7a0874; font-weight: bold;">echo</span> <span style="color: #ff0000;">&quot;Setting directory permissions...&quot;</span>;
   <span style="color: #c20cb9; font-weight: bold;">find</span> <span style="color: #007800;">$2</span> <span style="color: #660033;">-name</span> <span style="color: #ff0000;">&quot;$3&quot;</span> <span style="color: #660033;">-type</span> d <span style="color: #660033;">-exec</span> setfacl <span style="color: #660033;">-R</span> <span style="color: #660033;">-m</span> u:<span style="color: #007800;">$1</span>:rwx <span style="color: #7a0874; font-weight: bold;">&#123;</span><span style="color: #7a0874; font-weight: bold;">&#125;</span> \;
&nbsp;
   <span style="color: #666666; font-style: italic;">## Grant permissions to any files with the specified name</span>
   <span style="color: #7a0874; font-weight: bold;">echo</span> <span style="color: #ff0000;">&quot;Setting file permissions...&quot;</span>;
   <span style="color: #c20cb9; font-weight: bold;">find</span> <span style="color: #007800;">$2</span> <span style="color: #660033;">-name</span> <span style="color: #ff0000;">&quot;$3&quot;</span> <span style="color: #660033;">-type</span> f <span style="color: #660033;">-exec</span> setfacl <span style="color: #660033;">-m</span> u:<span style="color: #007800;">$1</span>:rw <span style="color: #7a0874; font-weight: bold;">&#123;</span><span style="color: #7a0874; font-weight: bold;">&#125;</span> \;
<span style="color: #7a0874; font-weight: bold;">&#125;</span>
&nbsp;
<span style="color: #666666; font-style: italic;">## </span>
<span style="color: #666666; font-style: italic;"># Grants read permissions to all files/folders with names matching $3, which reside</span>
<span style="color: #666666; font-style: italic;"># inside of directory $2, to group $1.</span>
<span style="color: #666666; font-style: italic;">#</span>
<span style="color: #666666; font-style: italic;"># @param string $1 Group The user to whom read permissions will be granted</span>
<span style="color: #666666; font-style: italic;"># @param string $2 Base path Path in which all operations will take place</span>
<span style="color: #666666; font-style: italic;"># @param string $3 Target Name of the file/directory on which to set the permissions</span>
<span style="color: #666666; font-style: italic;">#</span>
<span style="color: #000000; font-weight: bold;">function</span> grantGroupRead
<span style="color: #7a0874; font-weight: bold;">&#123;</span>
   <span style="color: #7a0874; font-weight: bold;">echo</span> <span style="color: #ff0000;">&quot;Granting read permission to group $1 on files/folders named $3 in directory $2&quot;</span>;
&nbsp;
   <span style="color: #666666; font-style: italic;">## Set the default permissions for new files on the specified directory</span>
   <span style="color: #7a0874; font-weight: bold;">echo</span> <span style="color: #ff0000;">&quot;Setting defaults...&quot;</span>;
   <span style="color: #c20cb9; font-weight: bold;">find</span> <span style="color: #007800;">$2</span> <span style="color: #660033;">-name</span> <span style="color: #ff0000;">&quot;$3&quot;</span> <span style="color: #660033;">-type</span> d <span style="color: #660033;">-exec</span> setfacl <span style="color: #660033;">-d</span> <span style="color: #660033;">-m</span> g:<span style="color: #007800;">$1</span>:rx <span style="color: #7a0874; font-weight: bold;">&#123;</span><span style="color: #7a0874; font-weight: bold;">&#125;</span> \;
&nbsp;
   <span style="color: #666666; font-style: italic;">## Recusively set the permissions on all existing directories and files within the</span>
   <span style="color: #666666; font-style: italic;">## specified directory</span>
   <span style="color: #7a0874; font-weight: bold;">echo</span> <span style="color: #ff0000;">&quot;Setting directory permissions...&quot;</span>;
   <span style="color: #c20cb9; font-weight: bold;">find</span> <span style="color: #007800;">$2</span> <span style="color: #660033;">-name</span> <span style="color: #ff0000;">&quot;$3&quot;</span> <span style="color: #660033;">-type</span> d <span style="color: #660033;">-exec</span> setfacl <span style="color: #660033;">-R</span> <span style="color: #660033;">-m</span> g:<span style="color: #007800;">$1</span>:rx <span style="color: #7a0874; font-weight: bold;">&#123;</span><span style="color: #7a0874; font-weight: bold;">&#125;</span> \;
&nbsp;
   <span style="color: #666666; font-style: italic;">## Grant permissions to any files with the specified name</span>
   <span style="color: #7a0874; font-weight: bold;">echo</span> <span style="color: #ff0000;">&quot;Setting file permissions...&quot;</span>;
   <span style="color: #c20cb9; font-weight: bold;">find</span> <span style="color: #007800;">$2</span>  <span style="color: #660033;">-name</span> <span style="color: #ff0000;">&quot;$3&quot;</span> <span style="color: #660033;">-type</span> f <span style="color: #660033;">-exec</span> setfacl <span style="color: #660033;">-m</span> g:<span style="color: #007800;">$1</span>:r <span style="color: #7a0874; font-weight: bold;">&#123;</span><span style="color: #7a0874; font-weight: bold;">&#125;</span> \;
<span style="color: #7a0874; font-weight: bold;">&#125;</span>
&nbsp;
<span style="color: #666666; font-style: italic;">## </span>
<span style="color: #666666; font-style: italic;"># Grants write permissions to all files/folders with names matching $3, which reside</span>
<span style="color: #666666; font-style: italic;"># inside of directory $2, to group $1.</span>
<span style="color: #666666; font-style: italic;">#</span>
<span style="color: #666666; font-style: italic;"># @param string $1 Group The user to whom read permissions will be granted</span>
<span style="color: #666666; font-style: italic;"># @param string $2 Base path Path in which all operations will take place</span>
<span style="color: #666666; font-style: italic;"># @param string $3 Target Name of the file/directory on which to set the permissions</span>
<span style="color: #666666; font-style: italic;">#</span>
<span style="color: #000000; font-weight: bold;">function</span> grantGroupWrite 
<span style="color: #7a0874; font-weight: bold;">&#123;</span>
   <span style="color: #7a0874; font-weight: bold;">echo</span> <span style="color: #ff0000;">&quot;Granting write permission to group $1 on files/folders named $3 in directory $2&quot;</span>;
&nbsp;
   <span style="color: #666666; font-style: italic;">## Set the default permissions for new files on the specified directory</span>
   <span style="color: #7a0874; font-weight: bold;">echo</span> <span style="color: #ff0000;">&quot;Setting defaults...&quot;</span>;
   <span style="color: #c20cb9; font-weight: bold;">find</span> <span style="color: #007800;">$2</span> <span style="color: #660033;">-name</span> <span style="color: #ff0000;">&quot;$3&quot;</span> <span style="color: #660033;">-type</span> d <span style="color: #660033;">-exec</span> setfacl <span style="color: #660033;">-d</span> <span style="color: #660033;">-m</span> g:<span style="color: #007800;">$1</span>:rwx <span style="color: #7a0874; font-weight: bold;">&#123;</span><span style="color: #7a0874; font-weight: bold;">&#125;</span> \;
&nbsp;
   <span style="color: #666666; font-style: italic;">## Recusively set the permissions on all existing directories and files within the</span>
   <span style="color: #666666; font-style: italic;">## specified directory</span>
   <span style="color: #7a0874; font-weight: bold;">echo</span> <span style="color: #ff0000;">&quot;Setting directory permissions...&quot;</span>;
   <span style="color: #c20cb9; font-weight: bold;">find</span> <span style="color: #007800;">$2</span> <span style="color: #660033;">-name</span> <span style="color: #ff0000;">&quot;$3&quot;</span> <span style="color: #660033;">-type</span> d <span style="color: #660033;">-exec</span> setfacl <span style="color: #660033;">-R</span> <span style="color: #660033;">-m</span> g:<span style="color: #007800;">$1</span>:rwx <span style="color: #7a0874; font-weight: bold;">&#123;</span><span style="color: #7a0874; font-weight: bold;">&#125;</span> \;
&nbsp;
   <span style="color: #666666; font-style: italic;">## Grant permissions to any files with the specified name</span>
   <span style="color: #7a0874; font-weight: bold;">echo</span> <span style="color: #ff0000;">&quot;Setting file permissions...&quot;</span>;
   <span style="color: #c20cb9; font-weight: bold;">find</span> <span style="color: #007800;">$2</span> <span style="color: #660033;">-name</span> <span style="color: #ff0000;">&quot;$3&quot;</span> <span style="color: #660033;">-type</span> f <span style="color: #660033;">-exec</span> setfacl <span style="color: #660033;">-m</span> g:<span style="color: #007800;">$1</span>:rw <span style="color: #7a0874; font-weight: bold;">&#123;</span><span style="color: #7a0874; font-weight: bold;">&#125;</span> \; 
<span style="color: #7a0874; font-weight: bold;">&#125;</span>
&nbsp;
<span style="color: #666666; font-style: italic;">## </span>
<span style="color: #666666; font-style: italic;"># Grants execute permissions to all files/folders with names matching $3, which reside</span>
<span style="color: #666666; font-style: italic;"># inside of directory $2, to user $1.</span>
<span style="color: #666666; font-style: italic;">#</span>
<span style="color: #666666; font-style: italic;"># @param string $1 Username The user to whom read permissions will be granted</span>
<span style="color: #666666; font-style: italic;"># @param string $2 Base path Path in which all operations will take place</span>
<span style="color: #666666; font-style: italic;"># @param string $3 Target Name of the file/directory on which to set the permissions</span>
<span style="color: #666666; font-style: italic;">#</span>
<span style="color: #000000; font-weight: bold;">function</span> grantUserExec
<span style="color: #7a0874; font-weight: bold;">&#123;</span>
   <span style="color: #7a0874; font-weight: bold;">echo</span> <span style="color: #ff0000;">&quot;Granting execute permission to user $1 on files/folders named $3 in directory $2&quot;</span>;
&nbsp;
   <span style="color: #666666; font-style: italic;">## Set the default permissions for new files on the specified directory</span>
   <span style="color: #7a0874; font-weight: bold;">echo</span> <span style="color: #ff0000;">&quot;Setting defaults...&quot;</span>;
   <span style="color: #c20cb9; font-weight: bold;">find</span> <span style="color: #007800;">$2</span> <span style="color: #660033;">-name</span> <span style="color: #ff0000;">&quot;$3&quot;</span> <span style="color: #660033;">-type</span> d <span style="color: #660033;">-exec</span> setfacl <span style="color: #660033;">-d</span> <span style="color: #660033;">-m</span> u:<span style="color: #007800;">$1</span>:rwx <span style="color: #7a0874; font-weight: bold;">&#123;</span><span style="color: #7a0874; font-weight: bold;">&#125;</span> \;
&nbsp;
   <span style="color: #666666; font-style: italic;">## Recusively set the permissions on all existing directories and files within the</span>
   <span style="color: #666666; font-style: italic;">## specified directory. One command will siffice for files and directories when</span>
   <span style="color: #666666; font-style: italic;">## setting execute permissions </span>
   <span style="color: #7a0874; font-weight: bold;">echo</span> <span style="color: #ff0000;">&quot;Setting directory and file permissions...&quot;</span>;
   <span style="color: #c20cb9; font-weight: bold;">find</span> <span style="color: #007800;">$2</span> <span style="color: #660033;">-name</span> <span style="color: #ff0000;">&quot;$3&quot;</span> <span style="color: #660033;">-exec</span> setfacl <span style="color: #660033;">-R</span> <span style="color: #660033;">-m</span> u:<span style="color: #007800;">$1</span>:rwx <span style="color: #7a0874; font-weight: bold;">&#123;</span><span style="color: #7a0874; font-weight: bold;">&#125;</span> \;
<span style="color: #7a0874; font-weight: bold;">&#125;</span>
&nbsp;
<span style="color: #666666; font-style: italic;">## </span>
<span style="color: #666666; font-style: italic;"># Grants execute permissions to all files/folders with names matching $3, which reside</span>
<span style="color: #666666; font-style: italic;"># inside of directory $2, to group $1.</span>
<span style="color: #666666; font-style: italic;">#</span>
<span style="color: #666666; font-style: italic;"># @param string $1 Group The user to whom read permissions will be granted</span>
<span style="color: #666666; font-style: italic;"># @param string $2 Base path Path in which all operations will take place</span>
<span style="color: #666666; font-style: italic;"># @param string $3 Target Name of the file/directory on which to set the permissions</span>
<span style="color: #666666; font-style: italic;">#</span>
<span style="color: #000000; font-weight: bold;">function</span> grantGroupExec
<span style="color: #7a0874; font-weight: bold;">&#123;</span>
   <span style="color: #7a0874; font-weight: bold;">echo</span> <span style="color: #ff0000;">&quot;Granting execute permission to group $1 on files/folders named $3 in directory $2&quot;</span>;
&nbsp;
   <span style="color: #666666; font-style: italic;">## Set the default permissions for new files on the specified directory</span>
   <span style="color: #7a0874; font-weight: bold;">echo</span> <span style="color: #ff0000;">&quot;Setting defaults...&quot;</span>;
   <span style="color: #c20cb9; font-weight: bold;">find</span> <span style="color: #007800;">$2</span> <span style="color: #660033;">-name</span> <span style="color: #ff0000;">&quot;$3&quot;</span> <span style="color: #660033;">-type</span> d <span style="color: #660033;">-exec</span> setfacl <span style="color: #660033;">-d</span> <span style="color: #660033;">-m</span> g:<span style="color: #007800;">$1</span>:rwx <span style="color: #7a0874; font-weight: bold;">&#123;</span><span style="color: #7a0874; font-weight: bold;">&#125;</span> \;
&nbsp;
   <span style="color: #666666; font-style: italic;">## Recusively set the permissions on all existing directories and files within the</span>
   <span style="color: #666666; font-style: italic;">## specified directory. One command will siffice for files and directories when</span>
   <span style="color: #666666; font-style: italic;">## setting execute permissions </span>
   <span style="color: #7a0874; font-weight: bold;">echo</span> <span style="color: #ff0000;">&quot;Setting directory and file permissions...&quot;</span>;
   <span style="color: #c20cb9; font-weight: bold;">find</span> <span style="color: #007800;">$2</span> <span style="color: #660033;">-name</span> <span style="color: #ff0000;">&quot;$3&quot;</span> <span style="color: #660033;">-exec</span> setfacl <span style="color: #660033;">-R</span> <span style="color: #660033;">-m</span> g:<span style="color: #007800;">$1</span>:rwx <span style="color: #7a0874; font-weight: bold;">&#123;</span><span style="color: #7a0874; font-weight: bold;">&#125;</span> \;
<span style="color: #7a0874; font-weight: bold;">&#125;</span></pre></div></div>

]]></content:encoded>
			<wfw:commentRss>http://bryan.ravensight.org/2010/01/linux-acl-management-functions/feed/</wfw:commentRss>
		<slash:comments>1</slash:comments>
		</item>
	</channel>
</rss>

