Commit 2d5a6fc850844fb30c94c749fed5564f54052b77
1 parent
ca8bb9df
Exists in
master
and in
4 other branches
Fix dir permission on creation
Showing
2 changed files
with
2 additions
and
2 deletions
Show diff stats
app/models/namespace.rb
| ... | ... | @@ -44,7 +44,7 @@ class Namespace < ActiveRecord::Base |
| 44 | 44 | |
| 45 | 45 | def ensure_dir_exist |
| 46 | 46 | namespace_dir_path = File.join(Gitlab.config.git_base_path, path) |
| 47 | - Dir.mkdir(namespace_dir_path, 0770) unless File.exists?(namespace_dir_path) | |
| 47 | + system("mkdir -m 770 #{namespace_dir_path}") unless File.exists?(namespace_dir_path) | |
| 48 | 48 | end |
| 49 | 49 | |
| 50 | 50 | def move_dir | ... | ... |
lib/gitlab/project_mover.rb
| ... | ... | @@ -16,7 +16,7 @@ module Gitlab |
| 16 | 16 | def execute |
| 17 | 17 | # Create new dir if missing |
| 18 | 18 | new_dir_path = File.join(Gitlab.config.git_base_path, new_dir) |
| 19 | - Dir.mkdir(new_dir_path, 0770) unless File.exists?(new_dir_path) | |
| 19 | + system("mkdir -m 770 #{new_dir_path}") unless File.exists?(new_dir_path) | |
| 20 | 20 | |
| 21 | 21 | old_path = File.join(Gitlab.config.git_base_path, old_dir, "#{project.path}.git") |
| 22 | 22 | new_path = File.join(new_dir_path, "#{project.path}.git") | ... | ... |