I've read the man page already. I think I'm close, but just not....quite...there.

We have a webroot directory that we want to make sure has the correct perms because multiple users are writing files to it. Inside that webroot, we have a symlink to another directory (media2). Because multiple sites use media2, we don't want to run this command and change perms there every time the script runs.

So, the /var/www/sandbox2 is the top level webroot.
Media2 is the symlinked directory that we want to avoid. Like the plague.

Can someone tell me what I'm doing wrong? I thought maybe I needed another -path statement, but isn't that what the -name does? (Oh yeah, the pruning needs to be recursive...should exclude ALL directories under media2...)

find -P '/var/www/sandbox2/' -type f -o -name media2 -prune -exec chown apache:www-sandbox {} \;

Help would be greatly appreciated!