From 027fa2673710b1421ed6929bbe615e78d2cc78f3 Mon Sep 17 00:00:00 2001 From: William Yardley Date: Thu, 19 Jan 2017 16:39:11 -0800 Subject: [PATCH] Permissions on fastcgi_params and uwsgi_params files (#1002) --- manifests/resource/location.pp | 4 ++-- manifests/resource/server.pp | 4 ++-- spec/defines/resource_location_spec.rb | 2 +- spec/defines/resource_server_spec.rb | 4 ++-- 4 files changed, 7 insertions(+), 7 deletions(-) diff --git a/manifests/resource/location.pp b/manifests/resource/location.pp index 4af9fd3cb..b18b74f57 100644 --- a/manifests/resource/location.pp +++ b/manifests/resource/location.pp @@ -413,7 +413,7 @@ if $ensure == present and $fastcgi != undef and !defined(File[$fastcgi_params]) { file { $fastcgi_params: ensure => present, - mode => '0770', + mode => '0644', content => template('nginx/server/fastcgi_params.erb'), } } @@ -421,7 +421,7 @@ if $ensure == present and $uwsgi != undef and !defined(File[$uwsgi_params]) { file { $uwsgi_params: ensure => present, - mode => '0770', + mode => '0644', content => template('nginx/server/uwsgi_params.erb'), } } diff --git a/manifests/resource/server.pp b/manifests/resource/server.pp index 81fa45cbc..3ddb31fbf 100644 --- a/manifests/resource/server.pp +++ b/manifests/resource/server.pp @@ -694,7 +694,7 @@ if $fastcgi != undef and !defined(File[$fastcgi_params]) { file { $fastcgi_params: ensure => present, - mode => '0770', + mode => '0644', content => template('nginx/server/fastcgi_params.erb'), } } @@ -702,7 +702,7 @@ if $uwsgi != undef and !defined(File[$uwsgi_params]) { file { $uwsgi_params: ensure => present, - mode => '0660', + mode => '0644', content => template('nginx/server/uwsgi_params.erb'), } } diff --git a/spec/defines/resource_location_spec.rb b/spec/defines/resource_location_spec.rb index a61353fa4..33a119218 100644 --- a/spec/defines/resource_location_spec.rb +++ b/spec/defines/resource_location_spec.rb @@ -856,7 +856,7 @@ context 'when fastcgi => "localhost:9000"' do let(:params) { { fastcgi: 'localhost:9000', server: 'server1' } } - it { is_expected.to contain_file('/etc/nginx/fastcgi_params').with_mode('0770') } + it { is_expected.to contain_file('/etc/nginx/fastcgi_params').with_mode('0644') } end context 'when uwsgi => "unix:/home/project/uwsgi.socket"' do diff --git a/spec/defines/resource_server_spec.rb b/spec/defines/resource_server_spec.rb index cd8c011c8..f08f9c5ac 100644 --- a/spec/defines/resource_server_spec.rb +++ b/spec/defines/resource_server_spec.rb @@ -997,7 +997,7 @@ default_params.merge(fastcgi: 'localhost:9000') end - it { is_expected.to contain_file('/etc/nginx/fastcgi_params').with_mode('0770') } + it { is_expected.to contain_file('/etc/nginx/fastcgi_params').with_mode('0644') } end context 'when fastcgi_param => {key => value}' do @@ -1013,7 +1013,7 @@ default_params.merge(uwsgi: 'uwsgi_upstream') end - it { is_expected.to contain_file('/etc/nginx/uwsgi_params').with_mode('0660') } + it { is_expected.to contain_file('/etc/nginx/uwsgi_params').with_mode('0644') } end context 'when listen_port == ssl_port' do