Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- #!/bin/bash
- ncpath='/home/saudinm/web/xxxxxx.com/public_html'
- saudinm='www-data'
- saudinm='www-data'
- rootuser='root'
- printf "Creating possible missing Directories\n"
- mkdir -p $ncpath/data
- mkdir -p $ncpath/assets
- mkdir -p $ncpath/updater
- printf "chmod Files and Directories\n"
- find ${ncpath}/ -type f -print0 | xargs -0 chmod 0640
- find ${ncpath}/ -type d -print0 | xargs -0 chmod 0750
- printf "chown Directories\n"
- chown -R ${rootuser}:${saudinm} ${ncpath}
- chown -R ${saudinm}:${saudinm} ${ncpath}/apps/
- chown -R ${saudinm}:${saudinm} ${ncpath}/assets/
- chown -R ${saudinm}:${saudinm} ${ncpath}/config/
- chown -R ${saudinm}:${saudinm} ${ncpath}/data/
- chown -R ${saudinm}:${saudinm} ${ncpath}/themes/
- chown -R ${saudinm}:${saudinm} ${ncpath}/updater/
- chmod +x ${ncpath}/occ
- printf "chmod/chown .htaccess\n"
- if [ -f ${ncpath}/.htaccess ]
- then
- chmod 0644 ${ncpath}/.htaccess
- chown ${rootuser}:${saudinm} ${ncpath}/.htaccess
- fi
- if [ -f ${ncpath}/data/.htaccess ]
- then
- chmod 0644 ${ncpath}/data/.htaccess
- chown ${rootuser}:${saudinm} ${ncpath}/data/.htaccess
- fi
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement