Created
July 1, 2011 15:10
-
-
Save cypres/1058743 to your computer and use it in GitHub Desktop.
fix permissions shell script
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/sh | |
/usr/bin/find /var/www -path "/var/www/*/wwwroot/*" \ | |
\( -type f ! -perm 660 -print0 -exec chmod 660 {} \; -exec sh -c exit 1 \; \) -or \ | |
\( -type d ! -perm 770 -print0 -exec chmod 770 {} \; -exec sh -c exit 1 \; \) -or \ | |
\( \( ! -user ftp -or ! -group www \) -print0 -exec chown -f ftp:www {} \; \) > /dev/null |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment