Commit 6a2852cf authored by Kirill Smelkov's avatar Kirill Smelkov

gitlab-backup/restore: Gitlab >= 8.5 now wants uploads to be 0700

Following up on 48062989 (gitlab-backup/restore: Gitlab wants uploads/
to be 0750 and dirs inside uploads/ to be 0755):

Starting from 8.5:

    https://gitlab.com/gitlab-org/gitlab-ce/commit/4f946f03

GitLab wants uploads/ to be 0700 and dirs inside uploads/ to be 0700
too.
parent 7279754d
...@@ -202,10 +202,10 @@ backup_restore() { ...@@ -202,10 +202,10 @@ backup_restore() {
$GIT_BACKUP restore $HEAD gitlab/misc:"$tmpd/gitlab_backup" $GIT_BACKUP restore $HEAD gitlab/misc:"$tmpd/gitlab_backup"
backup_info="$tmpd/gitlab_backup/backup_information.yml" backup_info="$tmpd/gitlab_backup/backup_information.yml"
# gitlab wants uploads/ to be 0750 and dirs inside uploads/ to be 0755 # gitlab >= 8.5 wants uploads/ to be 0700 and dirs inside uploads/ to be 0700
chmod 0750 "$tmpd/gitlab_backup"/uploads* chmod 0700 "$tmpd/gitlab_backup"/uploads*
find "$tmpd/gitlab_backup"/uploads* -mindepth 1 -type d \ find "$tmpd/gitlab_backup"/uploads* -mindepth 1 -type d \
-exec chmod 0755 {} ';' -exec chmod 0700 {} ';'
# recreate tarballs from *.tar.gz directories # recreate tarballs from *.tar.gz directories
find "$tmpd/gitlab_backup" -maxdepth 1 -type d -name "*.tar.gz" | \ find "$tmpd/gitlab_backup" -maxdepth 1 -type d -name "*.tar.gz" | \
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment