Running Asterisk as non- root

Install or run Asterisk non root it is a way to run our system more securely, After installing the files into their default locations, you will need to change the file permissions to match those of the user we’re going to be running as , ins case user asteriskpbx

$ sudo chown -R asteriskpbx:asteriskpbx /usr/lib/asterisk/
$ sudo chown -R asteriskpbx:asteriskpbx /var/lib/asterisk/
$ sudo chown -R asteriskpbx:asteriskpbx /var/spool/asterisk/
$ sudo chown -R asteriskpbx:asteriskpbx /var/log/asterisk/
$ sudo chown -R asteriskpbx:asteriskpbx /var/run/asterisk
$ sudo chown asteriskpbx:asteriskpbx /usr/sbin/asterisk

In order to use MeetMe() and DAHDI with Asterisk as non-root, you must change the /etc/udev/rules.d/dahdi.rules

check http://www.asteriskdocs.org/en/3rd_Edition/asterisk-book-html/asterisk-book.html#Installing_id292785

2 Likes