diff options
author | Marin Jankovski <marin@gitlab.com> | 2014-04-02 17:25:26 +0400 |
---|---|---|
committer | Marin Jankovski <marin@gitlab.com> | 2014-04-02 17:25:26 +0400 |
commit | 03b8dcce87c976a37a4de044e9f7cdfb8d64a3b7 (patch) | |
tree | 51e6c47af07bd8d863470b07de19dfb3afe8021a /lib | |
parent | 973f9d30d9c81a1a06670c257998f3bb8dfe43be (diff) |
Change the satellites directory permission in the install guide, add to rake check task.
Diffstat (limited to 'lib')
-rw-r--r-- | lib/tasks/gitlab/check.rake | 24 |
1 files changed, 24 insertions, 0 deletions
diff --git a/lib/tasks/gitlab/check.rake b/lib/tasks/gitlab/check.rake index 3b9b2531bf7..e9258cc626b 100644 --- a/lib/tasks/gitlab/check.rake +++ b/lib/tasks/gitlab/check.rake @@ -342,6 +342,7 @@ namespace :gitlab do check_repo_base_is_not_symlink check_repo_base_user_and_group check_repo_base_permissions + check_satellites_permissions check_update_hook_is_up_to_date check_repos_update_hooks_is_link check_gitlab_shell_self_test @@ -443,6 +444,29 @@ namespace :gitlab do end end + def check_satellites_permissions + print "Satellites access is drwxr-x---? ... " + + satellites_path = Gitlab.config.satellites.path + unless File.exists?(satellites_path) + puts "can't check because of previous errors".magenta + return + end + + if File.stat(satellites_path).mode.to_s(8).ends_with?("0750") + puts "yes".green + else + puts "no".red + try_fixing_it( + "sudo chmod u+rwx,g+rx,o-rwx #{satellites_path}", + ) + for_more_information( + see_installation_guide_section "GitLab" + ) + fix_and_rerun + end + end + def check_repo_base_user_and_group gitlab_shell_ssh_user = Gitlab.config.gitlab_shell.ssh_user gitlab_shell_owner_group = Gitlab.config.gitlab_shell.owner_group |