Hi all, I would like to start asterisk with a different user than "asterisk" in order to use the same than my apache server. I have tried to change it in /etc/init.d/asterisk but when I change USER, asterisk doesn't start. Has someone already start asterisk under other user that "asterisk"? Thanks Amaury -------------- next part -------------- An HTML attachment was scrubbed... URL: http://lists.digium.com/pipermail/asterisk-users/attachments/20051107/8bf46c01/attachment.htm
there is a lot more to changing the user than just su'ing you need to change the permissions on a lot of files too. On Mon, 7 Nov 2005, Amaury BOSSE wrote:> Hi all, > > I would like to start asterisk with a different user than "asterisk" in > order to use the same than my apache server. > > > > I have tried to change it in /etc/init.d/asterisk but when I change USER, > asterisk doesn't start. > > > > Has someone already start asterisk under other user that "asterisk"? > > > > Thanks > > > > Amaury > >-- -=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=- - - - Jason Pyeron PD Inc. http://www.pdinc.us - - Partner & Sr. Manager 7 West 24th Street #100 - - +1 (443) 269-1555 Baltimore, Maryland 21218 - - - -=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=- This message is for the designated recipient only and may contain privileged, proprietary, or otherwise private information. If you have received it in error, purge the message from your system and notify the sender immediately. Any other use of the email by you is prohibited.
If you give us more info it is easier to help. For example, if you are using a standard debian sarge setup I could help you and be sure to give you the right advice. However you might want to think carefully about this type of change. There are other approaches such as setting ownership and permissions for files and directories the webserver needs access to. Amaury BOSSE wrote:> Hi all, > > I would like to start asterisk with a different user than ?asterisk? > in order to use the same than my apache server. > > I have tried to change it in /etc/init.d/asterisk but when I change > USER, asterisk doesn?t start. > > Has someone already start asterisk under other user that ?asterisk?? > > Thanks > > Amaury > >------------------------------------------------------------------------ > >_______________________________________________ >--Bandwidth and Colocation sponsored by Easynews.com -- > >Asterisk-Users mailing list >Asterisk-Users@lists.digium.com >http://lists.digium.com/mailman/listinfo/asterisk-users >To UNSUBSCRIBE or update options visit: > http://lists.digium.com/mailman/listinfo/asterisk-users >
On Mon, Nov 07, 2005 at 05:27:00PM +0100, Amaury BOSSE wrote:> Hi all, > > I would like to start asterisk with a different user than "asterisk" in > order to use the same than my apache server. >Hmmm, you basically need to run apache's user to the Asterisk group. -- Tzafrir Cohen | tzafrir@jbr.cohens.org.il | VIM is http://tzafrir.org.il | | a Mutt's tzafrir@cohens.org.il | | best ICQ# 16849755 | | friend
Thanks for your answer, I am working on Debian Sarge but I have compiled Astersik 1.0.9 myself without .deb Packages. I need to access to voicemail and sound files from my web-interface (php and cgi/perl) but I can't change Apache user because of others applications. Asterisk creates files under Asterisk user and I have to access them from www-data user. Do you have other solution? I have tried using sudo but it doesn't seem to work. Regards, Amaury
Use group permissions. Add the apache user to the asterisk group and give the group the appropriate read and/or write access. IMO this is the easiest way to get around the apache permissions thing, and probably the Right Way (tm) -Ryan -----Original Message----- From: asterisk-users-bounces@lists.digium.com [mailto:asterisk-users-bounces@lists.digium.com] On Behalf Of amaury BOSSE Sent: Monday, November 07, 2005 12:44 PM To: Asterisk Users Mailing List - Non-Commercial Discussion Subject: RE: [Asterisk-Users] Change Asterisk User Thanks for your answer, I am working on Debian Sarge but I have compiled Astersik 1.0.9 myself without .deb Packages. I need to access to voicemail and sound files from my web-interface (php and cgi/perl) but I can't change Apache user because of others applications. Asterisk creates files under Asterisk user and I have to access them from www-data user. Do you have other solution? I have tried using sudo but it doesn't seem to work. Regards, Amaury _______________________________________________ --Bandwidth and Colocation sponsored by Easynews.com -- Asterisk-Users mailing list Asterisk-Users@lists.digium.com http://lists.digium.com/mailman/listinfo/asterisk-users To UNSUBSCRIBE or update options visit: http://lists.digium.com/mailman/listinfo/asterisk-users