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

/tmp/lavinmqctl.sock doesn't get permissions setup on initial install #923

Closed
HugoVG opened this issue Jan 23, 2025 · 4 comments
Closed

Comments

@HugoVG
Copy link

HugoVG commented Jan 23, 2025

Wanted to try out LavinMQ because it looks really promising, ran into a small easy (relatively easy to fix)

Describe the bug
I was doing a fresh install on Ubuntu 24.04(.1 LTS x86_64 Kernel: 6.8.0-51-generic)

Lavinmq seems to work fine,
lavinmqctl seems to work on it's own

lavinmqctl doesn't want to talk to lavinmq

$ lavinmqctl list_users
Listing users ...
LavinMQ is not running, socket not found: /tmp/lavinmqctl.sock

(the output is not true, it is created and clearly in /tmp)

srw-rw----   1 lavinmq  lavinmq        0 Jan 23 14:21 lavinmqctl.sock
       ^^ -- No read write
srw-rw-rw-   1 lavinmq  lavinmq        0 Jan 23 14:21 lavinmq-http.sock
srw-rw-rw-   1 lavinmq  lavinmq        0 Jan 23 14:21 lavinmq.sock

lavinmqctl doesn't seem to set up permissions for the lavinmqctl socket

after giving it chmod 777 (yes I know) everything works fine again

Describe your setup
Please describe the environment you are using, e.g. LavinMQ version, operating system, client software.

Fresh install of LavinMQ (as of 2025-01-23)
Operating system: Ubuntu 24.04.1 LTS x86_64 Kernel: 6.8.0-51-generic
client software: N/A

How to reproduce
fresh install on Ubuntu 24.04

Expected behavior
A clear and concise description of what you expected to happen.

The setups sets the permissions correctly for the lavinmqctl.sock

After setting permissions both the web UI en lavinmqctl work again

@viktorerlingsson
Copy link
Member

Hi @HugoVG

When you execute lavinmqctl in a terminal, it is executed with the user and permission that you have logged in with, so the easiest solution is probably that you run lavinmqctl with a user that has permissions to /tmp/lavinmqctl.sock. For example you can run lavinmqctl with sudo, sudo lavinmqctl list_users. or when logged in as root/administrator.

@carlhoerberg
Copy link
Member

carlhoerberg commented Jan 23, 2025 via email

@HugoVG
Copy link
Author

HugoVG commented Jan 23, 2025

It's run under systemd with lavinmq user (set from the apt install)

@viktorerlingsson
Copy link
Member

It's run under systemd with lavinmq user (set from the apt install)

Yes, LavinMQ is run under systemd with the lavinmq user. You need to run lavinmqctl with a user that has the same (or greater) permissions.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants