-
-#
-# 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
-