[rabbitmq-discuss] Running RabbitMQ as a different user

Jason J. W. Williams jasonjwwilliams at gmail.com
Mon Dec 19 22:31:34 GMT 2011


Hi Matt,

This should do it on Ubuntu:

sudo -H -u <user> /opt/rabbitmq-server/sbin/rabbitmq-server

The Erlang process needs to find the Erlang cookie and will check the
home directory of the executing user. You can also specify the
explicit location of the Erlang cookie in the RabbitMQ arguments, but
we find using the HOME environment simpler.

-J

On Mon, Dec 19, 2011 at 2:58 PM, Matt Pietrek <mpietrek at skytap.com> wrote:
> We have a production environment where all of our services run in a special,
> non-root account an an Ubuntu 10.04 environment. I'm experimenting with how
> to make RabbitMQ 2.7 run in this special account, rather than as the
> "rabbitmq" user, and not having much luck.
>
> Extensive searching of the mailing list makes me think I'm close, but I
> suspect I'm missing something fundamental.
>
> I believe part of the answer involves explicitly setting the "-cookie"
> option in RABBITMQ_SERVER_START_ARGS and RABBITMQ_CTL_ERL_ARGS environment
> variables.
> I also suspect that the answer also involves running the "low level" scripts
> in /usr/lib/rabbitmq/bin/, rather than the scripts in /usr/sbin/.
> Further, I suspect that some directories may need to have their ownership
> and/or attributes changed to something other than "rabbitmq".
>
> So what I'm looking for is a list of what exactly I need to do, both at
> launch time, as well as possibly at install time.
>
> FWIW, we need to launch rabbitmq-server ourselves, rather than having it
> auto start on boot. I know how to accomplish this, but it might be useful
> context when deciding how to approach the above.
>
> Thanks much,
>
> Matt
>
>
>
> _______________________________________________
> rabbitmq-discuss mailing list
> rabbitmq-discuss at lists.rabbitmq.com
> https://lists.rabbitmq.com/cgi-bin/mailman/listinfo/rabbitmq-discuss
>


More information about the rabbitmq-discuss mailing list