Return to BSD News archive
Path: euryale.cc.adfa.oz.au!newshost.anu.edu.au!harbinger.cc.monash.edu.au!munnari.OZ.AU!news.ecn.uoknor.edu!news.wildstar.net!newsfeed.direct.ca!hunter.premier.net!news1.erols.com!news From: Ken Bigelow <kbigelow@www.play-hookey.com> Newsgroups: comp.unix.bsd.freebsd.misc Subject: Re: httpd through cron Date: Mon, 15 Jul 1996 20:40:56 -0700 Organization: A poorly-installed InterNetNews site Lines: 72 Message-ID: <31EB0F48.7EE8@www.play-hookey.com> References: <4s88g3$krt@usenet.srv.cis.pitt.edu> <4sdo3p$461@usenet.srv.cis.pitt.edu> NNTP-Posting-Host: kenjb05.play-hookey.com Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Transfer-Encoding: 7bit X-Mailer: Mozilla 2.02 (Win16; I) James L Fox wrote: > > --------- > Note: > I know this group is FreeBSD and not SunOs or CERN but I also > know that many posters/readers here are running web servers, > understand cron, and might want to try to do what I'm doing > with Apache on FreeBSD. > --------- You have me confused on a number of points. First, above you specify the apache httpd server. Below, you indicate CERN. They're not the same, so which is it? If apache, it is arranged to start from /etc/sysconfig, and does quite well that way. > > Here I am again, the only responder to my own post! > I included all the dirty details of my problem after reading the > criticisms here of people who ask questions without sufficient > background information. Apparently I overdid it! Here's a > stripped down version of my question... If you need more details, > please refer back to the article referenced by this one. > > I can run the CERN httpd executable from the foreground of a login > to an unprivileged account on a Sun4 under SunOs 4.1.3. I call httpd > with nohup and terminate the command with "&". I use a port # > in the 7000 range and when I log out I leave behind what appears > to be a well behaved web server with MY OWN /cgi-bin/ directory! Is there a reason for 7000? HTTP runs on port 80 normally. > > My problem is that I want httpd to be lauched from cron so I > don't have to keep logging in and manually kicking it every time > the system is rebooted after maintenance. I've studied cron and > crontab documentation and now am able to get httpd to run when > I want it to under cron. HOWEVER..... > I'd suggest you start it from /etc/rc.local instead. That way it starts each time you reboot, automatically. > The server gets started ok but it appears NOT to have inherited > the file access permissions of my account. I suspect that if I made > the whole account's file system writable by the world, it might work! You don't want that! However, perhaps you can write a brief shell script to be run from /etc/rc.local, which will first launch the server, then wait for the launcher to drop from the process list, and then execute chmod and/or chown on appropriate files. That's the way I had to do it with my daughter's MUX program on my auxiliary server. I'm sure there's a better way to auto-start a user's program with the user's permissions at bootup, but I haven't found it yet. In the meantime, this at least works. > > The man pages tell me the image should run as the launcher. ??? > I don't think it's a path problem; I define the path and files > seem to be read ok. > > > >In summary --- launch from the foreground; no problems > > launch from cron; file access permission problems > > I hope this helps! -- Ken Are you interested in | byte-sized education | http://www.play-hookey.com over the Internet? |