Skip to content

Commit

Permalink
Permissions on fastcgi_params and uwsgi_params files (#1002)
Browse files Browse the repository at this point in the history
  • Loading branch information
William Yardley committed Jan 20, 2017
1 parent ad35502 commit 027fa26
Show file tree
Hide file tree
Showing 4 changed files with 7 additions and 7 deletions.
4 changes: 2 additions & 2 deletions manifests/resource/location.pp
Original file line number Diff line number Diff line change
Expand Up @@ -413,15 +413,15 @@
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'),
}
}

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'),
}
}
Expand Down
4 changes: 2 additions & 2 deletions manifests/resource/server.pp
Original file line number Diff line number Diff line change
Expand Up @@ -694,15 +694,15 @@
if $fastcgi != undef and !defined(File[$fastcgi_params]) {
file { $fastcgi_params:
ensure => present,
mode => '0770',
mode => '0644',
content => template('nginx/server/fastcgi_params.erb'),
}
}

if $uwsgi != undef and !defined(File[$uwsgi_params]) {
file { $uwsgi_params:
ensure => present,
mode => '0660',
mode => '0644',
content => template('nginx/server/uwsgi_params.erb'),
}
}
Expand Down
2 changes: 1 addition & 1 deletion spec/defines/resource_location_spec.rb
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
4 changes: 2 additions & 2 deletions spec/defines/resource_server_spec.rb
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand All @@ -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
Expand Down

0 comments on commit 027fa26

Please sign in to comment.