[OpenSIPS-Users] running opensips under another user

Dave Singer dave.singer at wideideas.com
Fri Feb 25 17:43:50 CET 2011


Anton,

When you are trying to start it are you starting it using the -u opensips
and -g opensips command line options to have it run as opensips user and
group?
That way in the startup script you can easily remove the dead pid as root
(checking first to be sure opensips is not actually running).

Dave

On Thu, Feb 24, 2011 at 11:55 PM, Anton Zagorskiy <
a.zagorskiy at oyster-telecom.ru> wrote:

> Hi, Dave.
>
> The problem was I’v started openSIPS under not opensips user. With ‘sudo –u
> opensips /usr/local/sbin/opensips …’ openSIPS starts well.
>
>
>
> But now it seems that pid file isn’t erased when openSIPS failed to start.
>
>
>
>
>
>
>
> *From:* users-bounces at lists.opensips.org [mailto:
> users-bounces at lists.opensips.org] *On Behalf Of *Dave Singer
> *Sent:* Friday, February 25, 2011 4:14 AM
> *To:* OpenSIPS users mailling list
> *Subject:* Re: [OpenSIPS-Users] running opensips under another user
>
>
>
> Anton,
>
> Have you checked the selinux logs?
>
> Search the list about selinux. A couple months back I posted what I ran
> into and how to solve it fairly simply.
>
>
>
> Dave.
>
> On Thu, Feb 24, 2011 at 6:23 AM, Duane Larson <duane.larson at gmail.com>
> wrote:
>
> And you're positive that the /var/run/opensips directory is owned by the
> opensips:opensips user and group?  All I ever do is
>
>
>
> sudo mkdir /var/run/opensips/
> sudo chown opensips:opensips /var/run/opensips
>
>
>
> Never had that issue.
>
>
>
> cd /var/run
>
> ls -la
>
> drwxr-xr-x  2 opensips    opensips    4096 Feb 24 08:23 opensips
>
>
>
>
>
>
>
> On Thu, Feb 24, 2011 at 3:07 AM, Anton Zagorskiy <
> a.zagorskiy at oyster-telecom.ru> wrote:
>
> Hi.
>
> I've made a user opensips with group opensips and with shell nologin.
> Also, I've created /var/run/opensips with opensips::opensips and access
> mode
> 775
>
> Next, running openSIPS with -u opensips -g opensips -P
> /var/run/opensips/opensips.pid
> And opensips failed to start with:
>
> ERROR:core:daemonize: unable to create pid file
> /var/run/opensips/opensips.pid: Permission denied
>
>
> A command "sudo -u opensips touch /var/run/opensips/opensips1.pid" works
> well.
>
> What I'm doing wrong?
>
>
>
> WBR, Anton Zagorskiy
> VoIP Developer, Oyster Telecom
> Phone.: +7 812 601-0666
> Fax: +7 812 601-0593
> a.zagorskiy at oyster-telecom.ru
> www.oyster-telecom.ru
>
>
>
>
>
> _______________________________________________
> Users mailing list
> Users at lists.opensips.org
> http://lists.opensips.org/cgi-bin/mailman/listinfo/users
>
>
>
> --
> --
> *--*--*--*--*--*
> Duane
> *--*--*--*--*--*
> --
>
> _______________________________________________
> Users mailing list
> Users at lists.opensips.org
> http://lists.opensips.org/cgi-bin/mailman/listinfo/users
>
>
>
> _______________________________________________
> Users mailing list
> Users at lists.opensips.org
> http://lists.opensips.org/cgi-bin/mailman/listinfo/users
>
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.opensips.org/pipermail/users/attachments/20110225/aa18b777/attachment-0001.htm>


More information about the Users mailing list