| 123456789101112131415161718 |
- #!/bin/bash
- ncpath='/var/www/html'
- htuser='www-data'
- htgroup='www-data'
- rootuser='root'
- printf "chmod Files and Directories\n"
- find ${ncpath}/ -type f -print0 | xargs -0 chmod 0640
- find ${ncpath}/ -type d -print0 | xargs -0 chmod 0750
- chmod +x ${ncpath}/occ
- printf "chown Files and Directories\n"
- chown -R ${htuser}:${htgroup} ${ncpath}
- printf "chmod/chown .htaccess\n"
- find ${ncpath}/ -name .htaccess -print0 | xargs -0 chmod 0644
- find ${ncpath}/ -name .htaccess -print0 | xargs -0 chown ${rootuser}:${htgroup}
|