From owner-freebsd-questions@FreeBSD.ORG Fri Aug 24 08:51:27 2007 Return-Path: Delivered-To: freebsd-questions@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id CDD6016A41A for ; Fri, 24 Aug 2007 08:51:27 +0000 (UTC) (envelope-from freebsd-questions@m.gmane.org) Received: from ciao.gmane.org (main.gmane.org [80.91.229.2]) by mx1.freebsd.org (Postfix) with ESMTP id 4EBE213C4DE for ; Fri, 24 Aug 2007 08:51:27 +0000 (UTC) (envelope-from freebsd-questions@m.gmane.org) Received: from list by ciao.gmane.org with local (Exim 4.43) id 1IOUsk-0002nN-BY for freebsd-questions@freebsd.org; Fri, 24 Aug 2007 10:51:06 +0200 Received: from lara.cc.fer.hr ([161.53.72.113]) by main.gmane.org with esmtp (Gmexim 0.1 (Debian)) id 1AlnuQ-0007hv-00 for ; Fri, 24 Aug 2007 10:51:06 +0200 Received: from ivoras by lara.cc.fer.hr with local (Gmexim 0.1 (Debian)) id 1AlnuQ-0007hv-00 for ; Fri, 24 Aug 2007 10:51:06 +0200 X-Injected-Via-Gmane: http://gmane.org/ To: freebsd-questions@freebsd.org From: Ivan Voras Date: Fri, 24 Aug 2007 10:50:02 +0200 Lines: 46 Message-ID: References: <12306830.post@talk.nabble.com> <12307237.post@talk.nabble.com> Mime-Version: 1.0 Content-Type: multipart/signed; micalg=pgp-sha1; protocol="application/pgp-signature"; boundary="------------enig7BACD12D5AAB807F0B4FAE63" Content-Transfer-Encoding: 8bit X-Complaints-To: usenet@sea.gmane.org X-Gmane-NNTP-Posting-Host: lara.cc.fer.hr User-Agent: Thunderbird 1.5.0.12 (X11/20060911) In-Reply-To: <12307237.post@talk.nabble.com> X-Enigmail-Version: 0.95.2 Sender: news Subject: Re: Memcached Daemon Startup Issues X-BeenThere: freebsd-questions@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: User questions List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 24 Aug 2007 08:51:27 -0000 This is an OpenPGP/MIME signed message (RFC 2440 and 3156) --------------enig7BACD12D5AAB807F0B4FAE63 Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 8bit Peter Pluta wrote: > > > Peter Pluta wrote: >> I installed memcached and since it doesn't have a config file I entered >> the flags into rc.conf, but when I start it with the rc.d scripts, it >> always runs as nobody, instead of the user I specified with -u . The >> man page says "only when run as root". This confuses me somewhat because >> i'm executing the rc.d script as root, yet it still starts as nobody. I >> can manually start memcached with "memcached -u memcached -l 127.0.0.1 -p >> 11211 -m 32 -P /var/run/memcached/memcached.pid". >> >> /etc/rc.conf bit: >> memcached_enable="YES" >> memcached_flags='-u memcached -d -l 127.0.0.1 -m 32 -P >> /var/run/memcached.pid -p 1121' > Nvm, I had to take a look at the rc script to see that there was another > directive (memcached_user="") This is because memcached_user is checked by it's rc.d script and defaults to "nobody". Thus, when memcached is started from the script, without memcached_user set, it will be run as nobody, not as root, and it won't be able to switch to another user by itself. --------------enig7BACD12D5AAB807F0B4FAE63 Content-Type: application/pgp-signature; name="signature.asc" Content-Description: OpenPGP digital signature Content-Disposition: attachment; filename="signature.asc" -----BEGIN PGP SIGNATURE----- Version: GnuPG v1.4.5 (GNU/Linux) Comment: Using GnuPG with SUSE - http://enigmail.mozdev.org iD8DBQFGzpvCldnAQVacBcgRAgacAKCpi/p9K3It9DDf5Iepo/gO8r9c7wCcCaDj I9Iq2o+WhCdK8LUhT15y6jo= =J6eH -----END PGP SIGNATURE----- --------------enig7BACD12D5AAB807F0B4FAE63--