Skip to content
This repository has been archived by the owner on Jul 1, 2024. It is now read-only.

Fix Permissions #196

Closed
wants to merge 1 commit into from
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
7 changes: 4 additions & 3 deletions resources/config.rb
Original file line number Diff line number Diff line change
Expand Up @@ -32,8 +32,8 @@

action :render do
file "#{conf_dir}/#{conf_file}" do
owner user
group user
owner new_resource.user
group new_resource.user
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This is not part of the fix, since the user value and new_resource.user are the same, in this case.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

user was being passed in as nil when using:

owner   user
group   user

content properties_config(config)
end

Expand All @@ -46,7 +46,8 @@
env_vars_hash['JVMFLAGS'] = java_opts if java_opts

file "#{conf_dir}/zookeeper-env.sh" do
owner user
owner new_resource.user
group new_resource.user
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Adding the group here is a good call.

content exports_config(env_vars_hash) + "\n"
end
end
Expand Down
2 changes: 2 additions & 0 deletions resources/default.rb
Original file line number Diff line number Diff line change
Expand Up @@ -72,6 +72,8 @@
prefix_root install_dir
prefix_home install_dir
checksum new_resource.checksum if new_resource.checksum
owner username
group username
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Ahhh, I see. This is the trick, right here.

end

directory log_dir do
Expand Down