Skip to content

Instantly share code, notes, and snippets.

@govza
Created February 24, 2013 14:19
Show Gist options
  • Save govza/5024015 to your computer and use it in GitHub Desktop.
Save govza/5024015 to your computer and use it in GitHub Desktop.
#!/bin/bash
dir=/var/www/site
user=userofsite
echo "Set permissions for $dir...";
echo "CHOWN files...";
chown -R $user:$user "$dir";
echo "CHMOD directories...";
find "$dir" -type d -exec chmod 0755 '{}' \;
echo "CHMOD files...";
find "$dir" -type f -exec chmod 0644 '{}' \;
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment