Commit 0f78d92e authored by Vinnie Okada's avatar Vinnie Okada

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.
parent 6664da43
......@@ -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} ... "
......
......@@ -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
......
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