summaryrefslogtreecommitdiff
path: root/config
diff options
context:
space:
mode:
authorJacob Vosmaer <contact@jacobvosmaer.nl>2015-07-06 18:43:17 +0200
committerJacob Vosmaer <contact@jacobvosmaer.nl>2015-07-06 18:43:17 +0200
commitbb50b7fcd0161a7b9f0f87cb395e355a87a9dd17 (patch)
tree51117e68ca045edf22012e79cd1efc99d3f0254f /config
parent17446ff0c98e870f0500279983432e5115e060a4 (diff)
downloadgitlab-ce-bb50b7fcd0161a7b9f0f87cb395e355a87a9dd17.tar.gz
Allow custom backup archive permissions
This change helps system administrators who want to replicate GitLab backup files without needing root permissions.
Diffstat (limited to 'config')
-rw-r--r--config/gitlab.yml.example1
-rw-r--r--config/initializers/1_settings.rb1
2 files changed, 2 insertions, 0 deletions
diff --git a/config/gitlab.yml.example b/config/gitlab.yml.example
index c32ac2042d0..542106e86dd 100644
--- a/config/gitlab.yml.example
+++ b/config/gitlab.yml.example
@@ -247,6 +247,7 @@ production: &base
## Backup settings
backup:
path: "tmp/backups" # Relative paths are relative to Rails.root (default: tmp/backups/)
+ # archive_permissions: 0640 # Permissions for the resulting backup.tar file (default: 0600)
# keep_time: 604800 # default: 0 (forever) (in seconds)
# upload:
# # Fog storage connection settings, see http://fog.io/storage/ .
diff --git a/config/initializers/1_settings.rb b/config/initializers/1_settings.rb
index 7b5d488f59e..bd76c918485 100644
--- a/config/initializers/1_settings.rb
+++ b/config/initializers/1_settings.rb
@@ -170,6 +170,7 @@ Settings.gitlab_shell['ssh_path_prefix'] ||= Settings.send(:build_gitlab_shell_s
Settings['backup'] ||= Settingslogic.new({})
Settings.backup['keep_time'] ||= 0
Settings.backup['path'] = File.expand_path(Settings.backup['path'] || "tmp/backups/", Rails.root)
+Settings.backup['archive_permissions'] ||= 0600
Settings.backup['upload'] ||= Settingslogic.new({ 'remote_directory' => nil, 'connection' => nil })
# Convert upload connection settings to use symbol keys, to make Fog happy
if Settings.backup['upload']['connection']