Run asterisk as user other than root

I compiled Asterisk 11 from source as user root on CEntOS. Now I want Asterisk to run as user asterisk group asterisk. I have un-commented




I have also tried un-commenting the same variables in


I restart service asterisk and even reboot the server with the referred condition and when I

ps ax | grep [a]sterisk,

I still get

4457 pts/0 S 0:00 /bin/sh /usr/sbin/safe_asterisk
4459 pts/0 Sl 0:01 /usr/sbin/asterisk -f -vvvg -c

instead of

4457 pts/0 S 0:00 /bin/sh /usr/sbin/safe_asterisk -U asterisk -G asterisk
4459 pts/0 Sl 0:01 /usr/sbin/asterisk -f -U asterisk -G asterisk -vvvg -c

Please, note that UNIX user asterisk and group asterisk do exist in my system.

I kindly ask you to tell me how to proceed to get asterisk running as asterisk in group asterisk. By the way, if you add directions on which files and directories to change permissions on, to get asterisk running as I need, would be great.

Feedback will be more than welcome.

I’d try to set the values of ‘runuser’ and ‘rungroup’ in asterisk.conf.

About directories’ permissions: everything listed at the beginning of your asterisk.conf.