7 messages in com.perforce.perforce-user[p4] RedHat Linux 6.0
FromSent OnAttachments
Frank Merrow24 Sep 1999 08:13 
Rob Chandhok24 Sep 1999 08:33 
tr...@treysoft.com24 Sep 1999 08:51 
Stephen Vance25 Sep 1999 13:14 
Mark Blair27 Sep 1999 09:59 
Mark Lentczner27 Sep 1999 11:09.tgz
Frank Merrow03 Oct 1999 10:22 
Subject:[p4] RedHat Linux 6.0
From:Stephen Vance (ste@vance.com)
Date:09/25/1999 01:14:48 PM
List:com.perforce.perforce-user

trey at treysoft.com wrote:

On Fri, Sep 24, 1999 at 11:33:23AM -0400, Rob Chandhok wrote:

At 8:13 AM -0700 9/24/99, Frank Merrow wrote:

2. Getting p4d to always run as the "perforce" user I have setup. It seems to start as the user name.

Make it setuid after you do a chown to perforce.perforce.

3. I'd really rather have p4d startup as a full deamon at boot time rather than be required to start it as a user. I have nosed around in the /etc files and there are several likely looking places to hack in the startup, but not any where it would be an obvious and natural addition.

You can start it up in /etc/rc.d/rc.local, that's a pretty safe place.

We actually made a little init style script for starting and stopping the p4d processes, but we call it from rc.local.

You might consider starting it from inetd. p4d has a command line switch just for this purpose. You can then use the tcpwrapper stuff to add a bit more control over who can connect to it.

-- Trey

The inetd suggestion is fine, but be aware that it will slow down your access as it starts the daemon anew each time.

I also start p4d from rc.local. The 'su' command will allow this script, which is invoked at startup as root, to run it as a different user. For example,

su -c 'cd ~perforce; /usr/local/bin/p4d' - perforce

Will cd to the home directory of user 'perforce' and execute the p4d executable out of /usr/local/bin from there. Putting this in a wrapper script as another respondent suggested is also good in addition.

I would be careful applying setuid to the executable. Although that might solve the problem, it may do so at a potential security expense.

A computer programmer is a machine for turning coffee into programs. -- Paraphrase of the late mathematician Paul Erdo"s