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.
This commit is contained in:
parent
6664da431a
commit
0f78d92e4c
|
@ -17,7 +17,7 @@ module Backup
|
||||||
file << s.to_yaml.gsub(/^---\n/,'')
|
file << s.to_yaml.gsub(/^---\n/,'')
|
||||||
end
|
end
|
||||||
|
|
||||||
FileUtils.chmod_R(0700, %w{db uploads repositories})
|
FileUtils.chmod(0700, %w{db uploads repositories})
|
||||||
|
|
||||||
# create archive
|
# create archive
|
||||||
$progress.print "Creating backup archive: #{tar_file} ... "
|
$progress.print "Creating backup archive: #{tar_file} ... "
|
||||||
|
|
|
@ -87,7 +87,7 @@ describe 'gitlab:app namespace rake task' do
|
||||||
expect(tar_contents).to match('db/')
|
expect(tar_contents).to match('db/')
|
||||||
expect(tar_contents).to match('uploads/')
|
expect(tar_contents).to match('uploads/')
|
||||||
expect(tar_contents).to match('repositories/')
|
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
|
end
|
||||||
|
|
||||||
it 'should delete temp directories' do
|
it 'should delete temp directories' do
|
||||||
|
|
Loading…
Reference in New Issue