Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!

Bug 497104

Summary: net-im/prosody - init script should support running as a different user than jabber
Product: Gentoo Linux Reporter: Dirk Olmes <dirk.olmes>
Component: Current packagesAssignee: Rafael Martins (RETIRED) <rafaelmartins>
Status: RESOLVED FIXED    
Severity: normal CC: dschridde+gentoobugs, klausman
Priority: Normal    
Version: unspecified   
Hardware: All   
OS: Linux   
Whiteboard:
Package list:
Runtime testing required: ---

Description Dirk Olmes 2014-01-05 05:46:46 UTC
prosody is set up to run as uid jabber. When running prosodyctl adduser, it complains about wrong user:

Warning: Couldn't switch to Prosody user/group 'prosody'/'prosody': no-such-group

This happens because prosodyctl falls back to the 'prosody' user if no prosody_user is configured in /etc/jabber/prosody.cfg.lua. Adding prosody_user = "jabber" seems to fix the problem.

IMHO this setting should be added to the config when installing the ebuild ...

Reproducible: Always
Comment 1 Dirk Olmes 2014-01-10 04:51:47 UTC
I saw you changed the title of this bug. This makes me think I was not clear in my initial description.

This bug report is not about prosody running as uid jabber - that's totally fine with me. It's about consistency: if gentoo sets things up to run prosody as uid jabber, it should support all cases - one of those is using prosodyctl. And if you run prosodyctl from the command line, it expects the "prosody_user" setting inside /etc/jabber/prosody.cfg.lua or it will fall back to the user name prosody. See line 146 in /usr/bin/prosodyctl

Hope this description makes things clearer.
Comment 2 Alex HeadHunter Pyattaev 2019-02-26 13:47:20 UTC
This bug is still alive by the way - fresh install of prosody still has this issue - one needs to set username in config by hand.
One has to manually specify pidfile location in the config as well.
Here are the needed lines to be patched into config file:
prosody_user = "jabber"
pidfile = "/var/run/jabber/prosody.pid"
Comment 3 Larry the Git Cow gentoo-dev 2019-03-19 14:23:42 UTC
The bug has been closed via the following commit(s):

https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=ddcbbd13eb5e2ef77e733a67a05cedd03ab313cf

commit ddcbbd13eb5e2ef77e733a67a05cedd03ab313cf
Author:     Tobias Klausmann <klausman@gentoo.org>
AuthorDate: 2019-03-19 14:23:14 +0000
Commit:     Tobias Klausmann <klausman@gentoo.org>
CommitDate: 2019-03-19 14:23:34 +0000

    net-im/prosody: Patch default config
    
    This makes sure the default config uses the right user/group
    (jabber:jabber) and PID file.
    
    Fixes: https://bugs.gentoo.org/497104
    Package-Manager: Portage-2.3.62, Repoman-2.3.12
    Signed-off-by: Tobias Klausmann <klausman@gentoo.org>

 net-im/prosody/files/prosody_cfg-0.11.2-r1.patch | 16 +++++
 net-im/prosody/prosody-0.11.2-r1.ebuild          | 87 ++++++++++++++++++++++++
 2 files changed, 103 insertions(+)