Commit 2d5a6fc8 authored by Dmitriy Zaporozhets's avatar Dmitriy Zaporozhets

Fix dir permission on creation

parent ca8bb9df
...@@ -44,7 +44,7 @@ class Namespace < ActiveRecord::Base ...@@ -44,7 +44,7 @@ class Namespace < ActiveRecord::Base
def ensure_dir_exist def ensure_dir_exist
namespace_dir_path = File.join(Gitlab.config.git_base_path, path) namespace_dir_path = File.join(Gitlab.config.git_base_path, path)
Dir.mkdir(namespace_dir_path, 0770) unless File.exists?(namespace_dir_path) system("mkdir -m 770 #{namespace_dir_path}") unless File.exists?(namespace_dir_path)
end end
def move_dir def move_dir
......
...@@ -16,7 +16,7 @@ module Gitlab ...@@ -16,7 +16,7 @@ module Gitlab
def execute def execute
# Create new dir if missing # Create new dir if missing
new_dir_path = File.join(Gitlab.config.git_base_path, new_dir) new_dir_path = File.join(Gitlab.config.git_base_path, new_dir)
Dir.mkdir(new_dir_path, 0770) unless File.exists?(new_dir_path) system("mkdir -m 770 #{new_dir_path}") unless File.exists?(new_dir_path)
old_path = File.join(Gitlab.config.git_base_path, old_dir, "#{project.path}.git") old_path = File.join(Gitlab.config.git_base_path, old_dir, "#{project.path}.git")
new_path = File.join(new_dir_path, "#{project.path}.git") new_path = File.join(new_dir_path, "#{project.path}.git")
......
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