Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- #!/usr/bin/env bash
- chown -R santiago:www-data .
- perm_dir=750
- perm_file=740
- if [ -n "$1" ] && [ "$1" == "dev" ]; then
- perm_dir=770
- perm_file=770
- fi
- echo "dir permissions: $perm_dir"
- echo "file permissions: $perm_file"
- # Permisos para ver carpetas y archivos
- find common backend frontend console environments vendor -type d -exec chmod $perm_dir {} \;
- find common backend frontend console environments vendor -type f -exec chmod $perm_file {} \;
- # Permisos totales para owner y group
- find backend frontend console \( \
- -path '*/runtime*' -or \
- -path '*/web/assets*' \
- \) -execdir chmod 770 {} \;
- # setgid
- find backend frontend common console vendor -type d -execdir chmod g+s '{}' \;
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement