diff --git a/doc/install/installation.md b/doc/install/installation.md
index 1672b77afffc0878af00914a2f73b0888b7a50d5..11fbedffe97c15d745c9bd38fd2f27e28b3f410f 100644
--- a/doc/install/installation.md
+++ b/doc/install/installation.md
@@ -147,7 +147,7 @@ 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+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 
+    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/lib/tasks/gitlab/check.rake b/lib/tasks/gitlab/check.rake
index 5e25d1b5d4bf9c7d39d2a2259a7a10c0d3e115a2..27e94fca9225d21569b0016718b593574167a69a 100644
--- a/lib/tasks/gitlab/check.rake
+++ b/lib/tasks/gitlab/check.rake
@@ -730,7 +730,7 @@ namespace :gitlab do
         puts "no".red
         try_fixing_it(
           "sudo chmod -R ug+rwX,o-rwx #{repo_base_path}",
-          "sudo chmod -R u-s #{repo_base_path}",
+          "sudo chmod -R ug-s #{repo_base_path}",
           "find #{repo_base_path} -type d -print0 | sudo xargs -0 chmod g+s"
         )
         for_more_information(