[asterisk-users] Running Asterisk as root

Cesar Benjamin Garcia Martinez cesar at codinet.com.mx
Mon May 5 19:18:08 CDT 2008


Move to root:

sudo -s

type your passwd

and as root:


Edit the file /etc/init.d/asterisk

And uncommet the two lines than sasys something like 

AST_USER="asterisk"
AST_GROUP="asterisk"

You need to create the user asterisk on your system.

And create another symlink sh to bash:

cd /bin
rm -f sh
ln -s bash sh 



Edit your /etc/asterisk/asterisk.conf and replace the line:

astrundir => /var/run 

With:

astrundir => /var/lib/asterisk/var/run




Create that folder:

mkdir -p /var/lib/asterisk/var/run



and, chown to asterisk:asterisk the folders:


/var/lib/asterisk/
/usr/lib/asterisk/
/var/log/asterisk/

chown -Rv asterisk:asterisk /var/lib/asterisk/
chown -Rv asterisk:asterisk /usr/lib/asterisk/
chown -Rv asterisk:asterisk /var/log/asterisk/

that's all



Btw... delete the symlink sh -> dash into /bin

Start daemon


/etc/init.d/asterisk start



-----Mensaje original-----
De: asterisk-users-bounces at lists.digium.com
[mailto:asterisk-users-bounces at lists.digium.com] En nombre de Christian
Enviado el: Lunes, 05 de Mayo de 2008 07:00 p.m.
Para: asterisk-users at lists.digium.com
Asunto: [asterisk-users] Running Asterisk as root

Hi all,
I have seen discussions on this earlier on, but just want to hear some quick
thoughts.
I am running v1.6 of Asterisk on my Ubuntu installation, I did make config
to make it run at boot. Since I've got a firewall and don't have any other
servers running I am not worried. I have been htinking about running
Asterisk as a seperat user, but haven't done that yet.
Everything is working fine.
What do you think?
Thanks,
Christian


_______________________________________________
-- Bandwidth and Colocation Provided by http://www.api-digital.com --

asterisk-users mailing list
To UNSUBSCRIBE or update options visit:
   http://lists.digium.com/mailman/listinfo/asterisk-users

__________ NOD32 3076 (20080505) Information __________

This message was checked by NOD32 antivirus system.
http://www.eset.com





More information about the asterisk-users mailing list