Skip to content
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

Closed
mlcooper opened this issue Dec 4, 2014 · 5 comments

Comments

Projects
None yet
3 participants
@mlcooper
Copy link

commented Dec 4, 2014

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.

@jjasghar

This comment has been minimized.

Copy link
Collaborator

commented Dec 4, 2014

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?

@mlcooper

This comment has been minimized.

Copy link
Author

commented Dec 4, 2014

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

@jjasghar

This comment has been minimized.

Copy link
Collaborator

commented Dec 4, 2014

Seems very reasonable; can you put in the PR and the spec for it? 🤘

@jjasghar jjasghar added the TODO label Dec 4, 2014

@mlcooper

This comment has been minimized.

Copy link
Author

commented Dec 9, 2014

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.

@mlcooper mlcooper closed this Dec 9, 2014

@piyushjalan02

This comment has been minimized.

Copy link

commented Apr 20, 2019

Switch to rabbitmq user and then enable plugin:

$su - rabbitmq
$rabbitmq-plugins enable rabbitmq_management

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
You can’t perform that action at this time.