Advertisement
mandos1945

chmodweb

Aug 15th, 2022
921
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Bash 0.24 KB | Source Code | 0 0
  1. #!/bin/bash
  2. if [ $# -eq 0 ]; then
  3.         WEB_DIR="/srv/www"
  4. else
  5.         WEB_DIR=$1
  6. fi
  7.  
  8. chown -R www-data:www-data $WEB_DIR
  9. find $WEB_DIR -type d -exec chmod 755 {} \;
  10. find $WEB_DIR -type f -exec chmod 644 {} \;
  11. chmod -R g+rw $WEB_DIR
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement