Last active
August 29, 2015 13:58
-
-
Save tadas-s/10377723 to your computer and use it in GitHub Desktop.
www-data-writeable
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 | |
# | |
# Sets-up ACL for current + www-data users to allow writing to folder by both and deleting files created by each other. | |
# This simplifies some Symfony2 dev tasks | |
# | |
# *** NOT TO BE USED IN PRODUCTION SERVERS IN ANY WAY ***. | |
# | |
if [ -z "$1" ]; then | |
echo "Please give one or more folders" | |
exit 1 | |
else | |
TARGET=$* | |
fi | |
setfacl -R -m u:www-data:rwx -m u:`whoami`:rwx $TARGET | |
setfacl -dR -m u:www-data:rwx -m u:`whoami`:rwx $TARGET |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment