-
Notifications
You must be signed in to change notification settings - Fork 425
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
enabled_plugins file permissions issue #174
Comments
Sounds like we need to add a directory resource to https://github.com/jjasghar/rabbitmq/blob/b020d035bf27ade7eb7de0cda31910a8afd5f9ed/recipes/plugin_management.rb so it'll force the correct ownership? Any other thoughts? |
Yes, perhaps that would fix it. Would we also need to add that to this recipe? https://github.com/jjasghar/rabbitmq/blob/master/recipes/mgmt_console.rb |
Seems very reasonable; can you put in the PR and the spec for it? 🤘 |
We set umask 0022 in our Chef client.rb file and it fixed the issue. We kept our default system umask set to 0077 which was what was changing this file. When rabbitmq-plugins runs, the system believes that the file is being created from scratch so the umask 0077 was making it read/write only to the owner which is root. Having chef-client run under umask 0022 sets the file to 644 when it gets created and RabbitMQ is happy with that. |
Switch to rabbitmq user and then enable plugin: $su - rabbitmq |
After installing RabbitMQ via the cookbook, the /etc/rabbitmq/enabled_plugins file is set to permissions of 640 and is owned by the root user and group. Since Rabbit runs as the rabbitmq user, it can't read this file and I get this error:
Error description:
{error,
{cannot_read_enabled_plugins_file,"/etc/rabbitmq/enabled_plugins",
eacces}}
This prevents RabbitMQ from staying up and running. I have tried modifying the /etc/rabbitmq_enabled plugins file to chmod 644, however it always reverts back to 640. I have seen numerous other articles online about this exact issue, but they all say to chmod 644 the file, but as I mentioned it always reverts to 640 when I do this.
Has anyone else run into this issue with this cookbook? If so, how do I fix this properly/permanently? Thanks.
The text was updated successfully, but these errors were encountered: