Created
July 22, 2017 19:28
-
-
Save hforbess/673e00089287d4a8daf61825c207c145 to your computer and use it in GitHub Desktop.
Set correct perms for web pages 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/bash | |
user=$1 | |
if [ $user ] | |
then | |
find . -type d -exec chmod 775 {} \; | |
find . -type f -exec chmod 664 {} \; | |
chown $user:ghost . | |
chown -R $user:ghost * | |
else | |
echo "You must provide a user as a parameter." | |
fi |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment