Last active
August 29, 2015 14:05
-
-
Save tacone/67a9020ac63fbe339ed6 to your computer and use it in GitHub Desktop.
Give the webserver write permissions on 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
function wwwwrite () { | |
sudo setfacl -R -m u:www-data:rwX -m u:`whoami`:rwX $1 && sudo setfacl -dR -m u:www-data:rwx -m u:`whoami`:rwx $1 | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Works on Ubuntu and Debian derivatives. Tested on zsh, should work also in bash.
Use it like this: