Merge pull request #2440 from klamontagne/master

Don't setuid the repositories on installation
This commit is contained in:
Riyad Preukschas 2013-02-01 20:56:03 +01:00
commit 003c312104
3 changed files with 8 additions and 5 deletions

View file

@ -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"