Commit a7e203b7dd3b386bdef5ceb048d015f454561d2e

Authored by Marin Jankovski
1 parent 1d1c1116
Exists in master

Uploads directory change for permissions and ownershipt.

files/gitlab-cookbooks/gitlab/recipes/gitlab-rails.rb
@@ -30,7 +30,6 @@ gitlab_rails_log_dir = node['gitlab']['gitlab-rails']['log_directory'] @@ -30,7 +30,6 @@ gitlab_rails_log_dir = node['gitlab']['gitlab-rails']['log_directory']
30 gitlab_rails_env_dir, 30 gitlab_rails_env_dir,
31 gitlab_rails_working_dir, 31 gitlab_rails_working_dir,
32 gitlab_rails_tmp_dir, 32 gitlab_rails_tmp_dir,
33 - gitlab_rails_public_uploads_dir,  
34 node['gitlab']['gitlab-rails']['backup_path'], 33 node['gitlab']['gitlab-rails']['backup_path'],
35 node['gitlab']['gitlab-rails']['gitlab_repository_downloads_path'], 34 node['gitlab']['gitlab-rails']['gitlab_repository_downloads_path'],
36 gitlab_rails_log_dir 35 gitlab_rails_log_dir
@@ -50,11 +49,18 @@ end @@ -50,11 +49,18 @@ end
50 49
51 directory File.join(gitlab_rails_dir, "sockets") do 50 directory File.join(gitlab_rails_dir, "sockets") do
52 owner node['gitlab']['user']['username'] 51 owner node['gitlab']['user']['username']
53 - group node['gitlab']['web_server']['username'] 52 + group node['gitlab']['webserver']['username']
54 mode '0770' 53 mode '0770'
55 recursive true 54 recursive true
56 end 55 end
57 56
  57 +directory gitlab_rails_public_uploads_dir do
  58 + owner node['gitlab']['user']['username']
  59 + group node['gitlab']['webserver']['username']
  60 + mode '0750'
  61 + recursive true
  62 +end
  63 +
58 dependent_services = [] 64 dependent_services = []
59 dependent_services << "service[unicorn]" if OmnibusHelper.should_notify?("unicorn") 65 dependent_services << "service[unicorn]" if OmnibusHelper.should_notify?("unicorn")
60 dependent_services << "service[sidekiq]" if OmnibusHelper.should_notify?("sidekiq") 66 dependent_services << "service[sidekiq]" if OmnibusHelper.should_notify?("sidekiq")
files/gitlab-cookbooks/gitlab/templates/default/nginx.conf.erb
@@ -2,7 +2,7 @@ @@ -2,7 +2,7 @@
2 # erased! To change the contents below, edit /etc/gitlab/gitlab.rb 2 # erased! To change the contents below, edit /etc/gitlab/gitlab.rb
3 # and run `sudo gitlab-ctl reconfigure`. 3 # and run `sudo gitlab-ctl reconfigure`.
4 4
5 -user <%= node['gitlab']['user']['username'] %> <%= node['gitlab']['web_server']['username']%>; 5 +user <%= node['gitlab']['user']['username'] %> <%= node['gitlab']['webserver']['username']%>;
6 worker_processes <%= @worker_processes %>; 6 worker_processes <%= @worker_processes %>;
7 error_log /var/log/gitlab/nginx/error.log; 7 error_log /var/log/gitlab/nginx/error.log;
8 pid /var/opt/gitlab/nginx/nginx.pid; 8 pid /var/opt/gitlab/nginx/nginx.pid;