From 22bc4b2e4bbd70be86adf0bfb244b09e879478a4 Mon Sep 17 00:00:00 2001 From: DecaTec Date: Sat, 23 Sep 2017 11:32:48 +0200 Subject: [PATCH 1/1] Removed setting "strong directory permissions", as it is not recommended by Nextcloud anymore --- NextcloudBackup.sh | 2 +- NextcloudRestore.sh | 23 ++--------------------- README.md | 2 +- 3 files changed, 4 insertions(+), 23 deletions(-) diff --git a/NextcloudBackup.sh b/NextcloudBackup.sh index 469d9d1..a386464 100644 --- a/NextcloudBackup.sh +++ b/NextcloudBackup.sh @@ -142,4 +142,4 @@ fi echo echo "DONE!" -echo "Backup created: ${backupdir}" +echo "Backup created: ${backupdir}" \ No newline at end of file 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 # diff --git a/README.md b/README.md index 0a51e23..ee669f3 100644 --- a/README.md +++ b/README.md @@ -26,4 +26,4 @@ This will create a direcotry with the current time stamp in your main backup dir ## 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 -- 2.34.1