summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorDmitriy Zaporozhets <dzaporozhets@gitlab.com>2015-04-01 01:10:00 +0000
committerDmitriy Zaporozhets <dzaporozhets@gitlab.com>2015-04-01 01:10:00 +0000
commit7ed8b76f64dc642aa23668a880f99ce1e99d766e (patch)
tree559395d80790941909f5304ee93a9aa9ecf7899f
parentd71fbe713b53f6112226fbc13b7e5c007cb9289d (diff)
parent0f78d92e4cfaf5c6674701fdf54a7188686cb8eb (diff)
downloadgitlab-ce-7ed8b76f64dc642aa23668a880f99ce1e99d766e.tar.gz
Merge branch 'no-chmod-r' into 'master'
Don't use chmod_R for backup tars When creating backup tar files, only change permissions on the `db`, `uploads`, and `repositories` directories, not their contents. See https://dev.gitlab.org/gitlab/gitlabhq/merge_requests/1716#note_40472 See merge request !1744
-rw-r--r--lib/backup/manager.rb2
-rw-r--r--spec/tasks/gitlab/backup_rake_spec.rb2
2 files changed, 2 insertions, 2 deletions
diff --git a/lib/backup/manager.rb b/lib/backup/manager.rb
index afd05897509..d445150c55e 100644
--- a/lib/backup/manager.rb
+++ b/lib/backup/manager.rb
@@ -17,7 +17,7 @@ module Backup
file << s.to_yaml.gsub(/^---\n/,'')
end
- FileUtils.chmod_R(0700, %w{db uploads repositories})
+ FileUtils.chmod(0700, %w{db uploads repositories})
# create archive
$progress.print "Creating backup archive: #{tar_file} ... "
diff --git a/spec/tasks/gitlab/backup_rake_spec.rb b/spec/tasks/gitlab/backup_rake_spec.rb
index 8a411b7720a..3d5d21c2a13 100644
--- a/spec/tasks/gitlab/backup_rake_spec.rb
+++ b/spec/tasks/gitlab/backup_rake_spec.rb
@@ -87,7 +87,7 @@ describe 'gitlab:app namespace rake task' do
expect(tar_contents).to match('db/')
expect(tar_contents).to match('uploads/')
expect(tar_contents).to match('repositories/')
- expect(tar_contents).not_to match(/^.{4,9}[rwx]/)
+ expect(tar_contents).not_to match(/^.{4,9}[rwx].*(db|uploads|repositories)\/$/)
end
it 'should delete temp directories' do