diff --git a/doc/install/installation.md b/doc/install/installation.md index 0724bea9c3be36cfe5b9f9346ef4c5bc046a6221..1672b77afffc0878af00914a2f73b0888b7a50d5 100644 --- a/doc/install/installation.md +++ b/doc/install/installation.md @@ -145,8 +145,9 @@ Fix the directory permissions for the configuration directory: Fix the directory permissions for the repositories: # Make sure the repositories dir is owned by git and it stays that way - sudo chmod -R ug+rwXs,o-rwx /home/git/repositories/ + sudo chmod -R ug+rwX,o-rwx /home/git/repositories/ sudo chown -R git:git /home/git/repositories/ + find /home/git/repositories -type d -print0 | sudo xargs -0 chmod g+s ## Add domains to list to the list of known hosts diff --git a/doc/raketasks/maintenance.md b/doc/raketasks/maintenance.md index ee5a8a3b5fba3fcba50df087526202c4d2f96fca..110dbd161f7b63aa07e3349ad6fdf14452a63e4e 100644 --- a/doc/raketasks/maintenance.md +++ b/doc/raketasks/maintenance.md @@ -81,7 +81,7 @@ Config directory owned by git:git? ... yes Config directory access is drwxr-x---? ... yes Repo base directory exists? ... yes Repo base owned by git:git? ... yes -Repo base access is drwsrws---? ... yes +Repo base access is drwxrws---? ... yes Can clone gitolite-admin? ... yes Can commit to gitolite-admin? ... yes post-receive hook exists? ... yes diff --git a/lib/tasks/gitlab/check.rake b/lib/tasks/gitlab/check.rake index 1ca723f271a842fa9e5375c6e9bb93eced20f1a1..5e25d1b5d4bf9c7d39d2a2259a7a10c0d3e115a2 100644 --- a/lib/tasks/gitlab/check.rake +++ b/lib/tasks/gitlab/check.rake @@ -716,7 +716,7 @@ namespace :gitlab do end def check_repo_base_permissions - print "Repo base access is drwsrws---? ... " + print "Repo base access is drwxrws---? ... " repo_base_path = Gitlab.config.gitolite.repos_path unless File.exists?(repo_base_path) @@ -724,12 +724,14 @@ namespace :gitlab do return end - if File.stat(repo_base_path).mode.to_s(8).ends_with?("6770") + if File.stat(repo_base_path).mode.to_s(8).ends_with?("2770") puts "yes".green else puts "no".red try_fixing_it( - "sudo chmod -R ug+rwXs,o-rwx #{repo_base_path}" + "sudo chmod -R ug+rwX,o-rwx #{repo_base_path}", + "sudo chmod -R u-s #{repo_base_path}", + "find #{repo_base_path} -type d -print0 | sudo xargs -0 chmod g+s" ) for_more_information( see_installation_guide_section "Gitolite"