]> git.p6c8.net - nextcloud-backup-restore.git/blobdiff - NextcloudRestore.sh
Removed setting "strong directory permissions", as it is not recommended by Nextcloud...
[nextcloud-backup-restore.git] / NextcloudRestore.sh
index 200ff5f2f2ad97d36cf00a1db98ae04c69d2a277..dd110b0b2be12c075d1ecd259fbebc72525f52b7 100644 (file)
@@ -145,8 +145,8 @@ echo
 # Set directory permissions
 #
 echo "Setting directory permissions..."
 # 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
 
@@ -160,25 +160,6 @@ cd ~
 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
 #
 #
 # Disbale maintenance mode
 #

patrick-canterino.de