Created
May 22, 2014 15:13
-
-
Save jrnickell/e80d2d2027a2a7a011fe to your computer and use it in GitHub Desktop.
Script to apply command-line (user) and apache write permissions to a folder
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 | |
APACHEUSER=`ps aux | grep -E '[a]pache|[h]ttpd' | grep -v root | head -1 | cut -d\ -f1` | |
sudo setfacl -R -m u:$APACHEUSER:rwX -m u:`whoami`:rwX app/storage | |
sudo setfacl -dR -m u:$APACHEUSER:rwX -m u:`whoami`:rwX app/storage |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment