summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorRiyad Preukschas <riyad@informatik.uni-bremen.de>2013-02-01 20:56:03 +0100
committerRiyad Preukschas <riyad@informatik.uni-bremen.de>2013-02-01 20:56:03 +0100
commit003c3121049aef98bf37f048563b2ab892207620 (patch)
tree1cca26705d983ff55b2e2b97a4efd0d2954f9fcf
parent0965aeb2ea3a7f89b0a74b746ec9aee063b0713c (diff)
parentf4175219fb7a1cb93f7eed54bd6510a85345096e (diff)
downloadgitlab-ce-003c3121049aef98bf37f048563b2ab892207620.tar.gz
Merge pull request #2440 from klamontagne/master
Don't setuid the repositories on installation
-rw-r--r--doc/install/installation.md3
-rw-r--r--doc/raketasks/maintenance.md2
-rw-r--r--lib/tasks/gitlab/check.rake8
3 files changed, 8 insertions, 5 deletions
diff --git a/doc/install/installation.md b/doc/install/installation.md
index 0724bea9c3b..1672b77afff 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 ee5a8a3b5fb..110dbd161f7 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 1ca723f271a..5e25d1b5d4b 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"