Skip to content

Commit

Permalink
[SUSTAIN-782] Fix permissions on gemfiles created with strict umask o…
Browse files Browse the repository at this point in the history
…n a reconfigure

Signed-off-by: Prajakta Purohit <[email protected]>
  • Loading branch information
PrajaktaPurohit committed Nov 30, 2017
1 parent 2d499a6 commit 039ef07
Show file tree
Hide file tree
Showing 3 changed files with 14 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
maintainer_email "[email protected]"
license "Apache 2.0"
description "Installs and configures Chef Server from Omnibus"
long_description "Installs and configures Chef Server from Omnibus"
long_description "Installs and configures Chef Server from Omnibus"
version "0.1.1"
recipe "chef-server", "Configures the Chef Server from Omnibus"

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -114,6 +114,8 @@
include_recipe "private-chef::haproxy"
end

include_recipe "private-chef::fix_permissions"

# Configure Services
[
"postgresql",
Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
LIB_PATH="/opt/opscode/embedded/lib"
# The GEM_PATH should work since we allow only one version of ruby to be installed.
GEM_PATH="#{LIB_PATH}/ruby/gems/*/gems"

execute "find #{GEM_PATH} -executable -exec chmod 755 {} \\;" do
user "root"
end

execute "find #{GEM_PATH} \! -executable -exec chmod 644 {} \\;" do
user "root"
end

0 comments on commit 039ef07

Please sign in to comment.