Hello. I would like to run asterisk as an user other than root. I have seen some tutorials on the web, but I would like to know if there is some ?official? how-to for this. Is there? I looked at a thread on reviewboard regarding this (https://reviewboard.asterisk.org/r/654/). It was Paul Belangers work trying to make the installation process take care of this. But the conclusion seem to be that the parts concerning this was postponed. So, did it make it in some other way? BR, Torbj?rn Abrahamsson -------------- next part -------------- An HTML attachment was scrubbed... URL: <http://lists.digium.com/pipermail/asterisk-users/attachments/20111019/5a4e5150/attachment.htm>
What do you use _now_ to run asterisk: safe_asterisk, init-script, from command-line? What distribution do you use? To run asterisk from command line as user "asterisk", just run asterisk -U asterisk (asterisk user should be created), or edit /etc/asterisk.conf to run as user "asterisk". In production you preffer running init script. 2011/10/19 Torbj?rn Abrahamsson <torbjorn.abrahamsson at gmail.com>> Hello. **** > > ** ** > > I would like to run asterisk as an user other than root. I have seen some > tutorials on the web, but I would like to know if there is some ?official? > how-to for this. Is there?**** > > ** ** > > I looked at a thread on reviewboard regarding this ( > https://reviewboard.asterisk.org/r/654/). It was Paul Belangers work > trying to make the installation process take care of this. But the > conclusion seem to be that the parts concerning this was postponed. So, did > it make it in some other way?**** > > ** ** > > BR,**** > > Torbj?rn Abrahamsson**** > > ** ** > > ** ** > > -- > _____________________________________________________________________ > -- Bandwidth and Colocation Provided by http://www.api-digital.com -- > New to Asterisk? Join us for a live introductory webinar every Thurs: > http://www.asterisk.org/hello > > asterisk-users mailing list > To UNSUBSCRIBE or update options visit: > http://lists.digium.com/mailman/listinfo/asterisk-users >-------------- next part -------------- An HTML attachment was scrubbed... URL: <http://lists.digium.com/pipermail/asterisk-users/attachments/20111019/272e2f32/attachment.htm>
Thank you, I actually found the asterisk.conf settings after sending the mail. So next question is which folders/files do I need to change ownership of to make it work? /etc/asterisk /var/lib/asterisk /usr/lib/asterisk /var/spool/asterisk /var/log/asterisk And the files in them of course Any more? Any that should not be in the list above? In asterisk.conf I am using the following: runuser = asterisk rungroup = asterisk Is this sufficient? Br, Torbj?rn Abrahamsson From: asterisk-users-bounces at lists.digium.com [mailto:asterisk-users-bounces at lists.digium.com] On Behalf Of Anton Kvashenkin Sent: Wednesday, October 19, 2011 12:11 PM To: Asterisk Users Mailing List - Non-Commercial Discussion Subject: Re: [asterisk-users] Running as non-root What do you use _now_ to run asterisk: safe_asterisk, init-script, from command-line? What distribution do you use? To run asterisk from command line as user "asterisk", just run asterisk -U asterisk (asterisk user should be created), or edit /etc/asterisk.conf to run as user "asterisk". In production you preffer running init script. 2011/10/19 Torbj?rn Abrahamsson <torbjorn.abrahamsson at gmail.com> Hello. I would like to run asterisk as an user other than root. I have seen some tutorials on the web, but I would like to know if there is some ?official? how-to for this. Is there? I looked at a thread on reviewboard regarding this (https://reviewboard.asterisk.org/r/654/). It was Paul Belangers work trying to make the installation process take care of this. But the conclusion seem to be that the parts concerning this was postponed. So, did it make it in some other way? BR, Torbj?rn Abrahamsson -- _____________________________________________________________________ -- Bandwidth and Colocation Provided by http://www.api-digital.com -- New to Asterisk? Join us for a live introductory webinar every Thurs: http://www.asterisk.org/hello asterisk-users mailing list To UNSUBSCRIBE or update options visit: http://lists.digium.com/mailman/listinfo/asterisk-users -------------- next part -------------- An HTML attachment was scrubbed... URL: <http://lists.digium.com/pipermail/asterisk-users/attachments/20111019/e171d239/attachment-0001.htm>
On Wed, Oct 19, 2011 at 7:19 AM, Torbj?rn Abrahamsson <torbjorn.abrahamsson at gmail.com> wrote:> Thank you, I actually found the asterisk.conf settings after sending the > mail. So next question is which folders/files do I need to change ownership > of to make it work? > > > > /etc/asterisk > > /var/lib/asterisk > > /usr/lib/asterisk > > /var/spool/asterisk > > /var/log/asterisk > > > > And the files in them of course? Any more? Any that should not be in the > list above?If you use DAHDI, you need to change ownership of /dev/dahdi/* to the non-root owner. I ended up rolling that into the init script for dahdi.
On 11-10-19 05:50 AM, Torbj?rn Abrahamsson wrote:> Hello. > > I would like to run asterisk as an user other than root. I have seen some > tutorials on the web, but I would like to know if there is some ?official? > how-to for this. Is there? > > I looked at a thread on reviewboard regarding this > (https://reviewboard.asterisk.org/r/654/). It was Paul Belangers work trying > to make the installation process take care of this. But the conclusion seem > to be that the parts concerning this was postponed. So, did it make it in > some other way? >My original goal for that patch was to have asterisk do most of the leg work setting up the host for a non-root install. At the time I didn't think any specific part of asterisk actually required root permissions. Later out I found to properly use snmp you actually need to run asterisk as root. There was also some logic added to the configure script but in the end it would have been too much work trying to manage all the was to add users in the different operating systems. I had planned to add a script into contrib folder for it, but sadly never got around to it. Perhaps I'll spend some time on it at Astricon. -- Paul Belanger Digium, Inc. | Software Developer twitter: pabelanger | IRC: pabelanger (Freenode) Check us out at: http://digium.com & http://asterisk.org
2011/10/19 Paul Belanger <pabelanger at digium.com>> <snip> Later out I found to properly use snmp you actually need to run > asterisk as root. > >Hi, Can you elaborate a bit ? Which SNMP feature requires to run asterisk as root ? Regards -------------- next part -------------- An HTML attachment was scrubbed... URL: <http://lists.digium.com/pipermail/asterisk-users/attachments/20111020/661f7cc1/attachment.htm>