# 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
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
#
## Restore
-For restore, just call *NextcloudRestore.sh*. This script expects one parameter which is the name of the backup to be restored. In our example, this would be *20170910_132703* (the time stamp of the backup created before). So the full command for a restore would be *./NextcloudRestore.sh 20170910_132703*.
+For restore, just call *NextcloudRestore.sh*. This script expects one parameter which is the name of the backup to be restored. In our example, this would be *20170910_132703* (the time stamp of the backup created before). So the full command for a restore would be *./NextcloudRestore.sh 20170910_132703*.
\ No newline at end of file