[asterisk-users] asterisk as non root
Tzafrir Cohen
tzafrir.cohen at xorcom.com
Wed Apr 19 09:03:17 CDT 2017
On Wed, Apr 19, 2017 at 04:44:39PM +0300, Atux Atux wrote:
> hello there. i am running debian 8 in my swerver and i would like to run
> asterisk as non root.
The Asterisk package included with Debian already does that. Why not
have a look at it?
> i did follow the
> https://www.voip-info.org/wiki-Asterisk+non-root without any success. when
> i issue
> root at PBX: ~ $ asterisk -U asterisk -G asterisk
The options -U and -G are for the case of running Asterisk as root and
having Asterisk change user and group afterwards. There are a number of
options that only work that way (real-time priority, special socket
permissions, IIRC).
Alternatively you can use other mans to change to that user (--chuid or
start-stop-daemon or User: and Group: in a systemd service file, or
whatever). And then you don't need those options.
> Privilege escalation protection disabled!
> See https://wiki.asterisk.org/wiki/x/1gKfAQ for more details.
Read that text. But it is irrelevant for your situation.
> Unable to access the running directory (Permission denied). Changing to '/'
> for compatibility.
/root is not accessible by the user asterisk. This is mostly harmless,
but not if you want to have core files (see also -g) and maybe a few
other minor things.
> Asterisk already running on /var/run/asterisk/asterisk.ctl. Use 'asterisk
> -r' to connect.
Because you already ran that command before. Or already have the system
copy of asterisk running. Or whatever.
Reading error messages helps.
--
Tzafrir Cohen
+972-50-7952406 mailto:tzafrir.cohen at xorcom.com
http://www.xorcom.com
More information about the asterisk-users
mailing list