SHOW:
|
|
- or go back to the newest paste.
| 1 | #!/bin/bash | |
| 2 | - | ncpath='/home/saudinm/web/saudi-nm.com/public_html' |
| 2 | + | ncpath='/home/saudinm/web/xxxxxx.com/public_html' |
| 3 | saudinm='www-data' | |
| 4 | saudinm='www-data' | |
| 5 | rootuser='root' | |
| 6 | ||
| 7 | printf "Creating possible missing Directories\n" | |
| 8 | mkdir -p $ncpath/data | |
| 9 | mkdir -p $ncpath/assets | |
| 10 | mkdir -p $ncpath/updater | |
| 11 | ||
| 12 | printf "chmod Files and Directories\n" | |
| 13 | find ${ncpath}/ -type f -print0 | xargs -0 chmod 0640
| |
| 14 | find ${ncpath}/ -type d -print0 | xargs -0 chmod 0750
| |
| 15 | ||
| 16 | printf "chown Directories\n" | |
| 17 | chown -R ${rootuser}:${saudinm} ${ncpath}
| |
| 18 | chown -R ${saudinm}:${saudinm} ${ncpath}/apps/
| |
| 19 | chown -R ${saudinm}:${saudinm} ${ncpath}/assets/
| |
| 20 | chown -R ${saudinm}:${saudinm} ${ncpath}/config/
| |
| 21 | chown -R ${saudinm}:${saudinm} ${ncpath}/data/
| |
| 22 | chown -R ${saudinm}:${saudinm} ${ncpath}/themes/
| |
| 23 | chown -R ${saudinm}:${saudinm} ${ncpath}/updater/
| |
| 24 | ||
| 25 | chmod +x ${ncpath}/occ
| |
| 26 | ||
| 27 | printf "chmod/chown .htaccess\n" | |
| 28 | if [ -f ${ncpath}/.htaccess ]
| |
| 29 | then | |
| 30 | chmod 0644 ${ncpath}/.htaccess
| |
| 31 | chown ${rootuser}:${saudinm} ${ncpath}/.htaccess
| |
| 32 | fi | |
| 33 | if [ -f ${ncpath}/data/.htaccess ]
| |
| 34 | then | |
| 35 | chmod 0644 ${ncpath}/data/.htaccess
| |
| 36 | chown ${rootuser}:${saudinm} ${ncpath}/data/.htaccess
| |
| 37 | fi |