[cochiselinux] Keeping a Background Process Going After Logging Off

  • From: "George Self" <gself@xxxxxxxxx>
  • To: <cochiselinux@xxxxxxxxxxxxx>
  • Date: Tue, 22 Jun 2004 16:46:12 -0700

Folks: 

I'm running RedHat Enterprise ES3 L3. I'm using it as a Web/FTP server so
I'm running a LAMP system. I just discovered a bit of a problem with it
yesterday and wanted to get some help from folks with smarter thinking than
mine.

I'm using an FTP server called "Pure-FTP". I chose this server since it
gives me the control I wanted. To start the server, I log on as Root and
enter the following line:

/usr/local/sbin/pure-ftpd -a -b -Z &

(There are a number of other switches I set that I did not put in the above
line, but you get the idea.) I start it as a background process so it can
monitor the FTP port and service incoming traffic while I'm doing other work
with the system.

The problem is that Root owns this process and if I log Root off in order to
log on as "selfg" (so I don't accidentally screw up the server) the process
dies and I lose FTP capability.

Is there a way for me to switch the process owner to some other user so I
can log Root off? Or is there a way to keep this daemon running even when
Root is logged off? Do I need to put this line in the local startup script
and then re-start the server?

I've checked the Linux books I have on my shelf, looked at the archives of a
Usenet newsgroup, and Googled for some help, but did not find anything.
(Well, I did discover that what I need to do is "fork off and die" (really,
that's how to create a daemon) - but I wasn't sure how to make that happen.)

Thanks for any clues you can offer.

George Self


--------------------------------------------------------------------
Cochise Linux Users Group Mailing List - cochiselinux@xxxxxxxxxxxxx
For more information:  http://www.cochiselinux.org
To unsubscribe: //www.freelists.org/list/cochiselinux

Other related posts: