title: How to set permissions recursively, 700 for folders and 600 for files, without using find
body: <p>I'm trying to figure out a way to set permissions recursively 700 for dirs and subdirs on a specific path and 600 for files. I would use these commands:</p>
  <pre class="lang-sh prettyprint-override"><code>find /path -type d -print0 | xargs -0 chmod 700
  find /path -type f -print0 | xargs -0 chmod 600
  </code></pre>
  <p>But the user does not have permission to run the &quot;find&quot; command.
  As a workaround I tried to make a script that contains the above commands from the root user with setuid sticky bit set so it will run with root privileges (like passwd or sudo commands that normal users run with root privileges):</p>
  <pre class="lang-sh prettyprint-override"><code>chmod 4755 script.sh
  </code></pre>
  <p>but i cannot execute the script from the limited user account, it still says that I don't have permission to run the find command.</p>
  <p>Does anyone have any idea how i can accomplish this without having to use the <code>find</code> command?</p>
  <p><strong>Edit:</strong>
  OS: Centos 6.5</p>