X-Git-Url: https://git.p6c8.net/nextcloud-backup-restore.git/blobdiff_plain/f7117da82f1e493bdc1b2d583056526426788706..22bc4b2e4bbd70be86adf0bfb244b09e879478a4:/NextcloudRestore.sh?ds=sidebyside diff --git a/NextcloudRestore.sh b/NextcloudRestore.sh index 200ff5f..dd110b0 100644 --- a/NextcloudRestore.sh +++ b/NextcloudRestore.sh @@ -145,8 +145,8 @@ echo # Set directory permissions # echo "Setting directory permissions..." -chown -R "${webserverUser}" "${nextcloudFileDir}" -chown -R "${webserverUser}" "${nextcloudDataDir}" +chown -R "${webserverUser}":"${webserverUser}" "${nextcloudFileDir}" +chown -R "${webserverUser}":"${webserverUser}" "${nextcloudDataDir}" echo "Done" echo @@ -160,25 +160,6 @@ cd ~ echo "Done" echo - -# -# Restore hardened directory permissions -# -echo "Set hardened directory permissions..." -find "${nextcloudFileDir}" -type f -print0 | xargs -0 chmod 0640 -find "${nextcloudFileDir}" -type d -print0 | xargs -0 chmod 0750 -chown -R root:"${webserverUser}" "${nextcloudFileDir}" -chown -R "${webserverUser}":"${webserverUser}" "${nextcloudFileDir}/apps/" -chown -R "${webserverUser}":"${webserverUser}" "${nextcloudFileDir}/config/" -chown -R "${webserverUser}":"${webserverUser}" "${nextcloudFileDir}/themes/" -chown -R "${webserverUser}":"${webserverUser}" "${nextcloudDataDir}" -chown root:"${webserverUser}" "${nextcloudFileDir}/.htaccess" -chown root:"${webserverUser}" "${nextcloudDataDir}/.htaccess" -chmod 0644 "${nextcloudFileDir}/.htaccess" -chmod 0644 "${nextcloudDataDir}/.htaccess" -echo "Done" -echo - # # Disbale maintenance mode #