Skip to content

Instantly share code, notes, and snippets.

@tacone
Last active August 29, 2015 14:05
Show Gist options
  • Save tacone/67a9020ac63fbe339ed6 to your computer and use it in GitHub Desktop.
Save tacone/67a9020ac63fbe339ed6 to your computer and use it in GitHub Desktop.
Give the webserver write permissions on a folder
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
}
@tacone
Copy link
Author

tacone commented Aug 15, 2014

Works on Ubuntu and Debian derivatives. Tested on zsh, should work also in bash.

Use it like this:

$ wwwwrite app/storage

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment