Commit 003c3121 authored by Riyad Preukschas's avatar Riyad Preukschas

Merge pull request #2440 from klamontagne/master

Don't setuid the repositories on installation
parents 0965aeb2 f4175219
...@@ -145,8 +145,9 @@ Fix the directory permissions for the configuration directory: ...@@ -145,8 +145,9 @@ Fix the directory permissions for the configuration directory:
Fix the directory permissions for the repositories: Fix the directory permissions for the repositories:
# Make sure the repositories dir is owned by git and it stays that way # 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/ 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 ## Add domains to list to the list of known hosts
......
...@@ -81,7 +81,7 @@ Config directory owned by git:git? ... yes ...@@ -81,7 +81,7 @@ Config directory owned by git:git? ... yes
Config directory access is drwxr-x---? ... yes Config directory access is drwxr-x---? ... yes
Repo base directory exists? ... yes Repo base directory exists? ... yes
Repo base owned by git:git? ... 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 clone gitolite-admin? ... yes
Can commit to gitolite-admin? ... yes Can commit to gitolite-admin? ... yes
post-receive hook exists? ... yes post-receive hook exists? ... yes
......
...@@ -716,7 +716,7 @@ namespace :gitlab do ...@@ -716,7 +716,7 @@ namespace :gitlab do
end end
def check_repo_base_permissions 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 repo_base_path = Gitlab.config.gitolite.repos_path
unless File.exists?(repo_base_path) unless File.exists?(repo_base_path)
...@@ -724,12 +724,14 @@ namespace :gitlab do ...@@ -724,12 +724,14 @@ namespace :gitlab do
return return
end 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 puts "yes".green
else else
puts "no".red puts "no".red
try_fixing_it( 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( for_more_information(
see_installation_guide_section "Gitolite" see_installation_guide_section "Gitolite"
......
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