Advertisement
ganryu

permisos

Dec 13th, 2017
109
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Bash 0.71 KB | None | 0 0
  1. #!/usr/bin/env bash
  2.  
  3. chown -R santiago:www-data .
  4.  
  5. perm_dir=750
  6. perm_file=740
  7.  
  8. if [ -n "$1" ] && [ "$1" == "dev" ]; then
  9.     perm_dir=770
  10.     perm_file=770
  11. fi
  12.  
  13. echo "dir permissions: $perm_dir"
  14. echo "file permissions: $perm_file"
  15.  
  16. # Permisos para ver carpetas y archivos
  17. find common backend frontend console environments vendor  -type d -exec chmod $perm_dir {} \;
  18. find common backend frontend console environments vendor -type f -exec chmod $perm_file {} \;
  19.  
  20. # Permisos totales para owner y group
  21. find backend frontend console \( \
  22.     -path '*/runtime*' -or \
  23.     -path '*/web/assets*' \
  24. \) -execdir chmod 770 {} \;
  25.  
  26. # setgid
  27. find backend frontend common console vendor -type d -execdir chmod g+s '{}' \;
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement