*BSD News Article 73870


Return to BSD News archive

Path: euryale.cc.adfa.oz.au!newshost.anu.edu.au!harbinger.cc.monash.edu.au!nntp.coast.net!news.kei.com!news.mathworks.com!hunter.premier.net!news.uoregon.edu!newsfeed.orst.edu!news.uidaho.edu!usenet
From: "Faried Nawaz" <fn@uidaho.edu>
Newsgroups: comp.unix.bsd.freebsd.misc
Subject: Re: httpd through cron
Date: 15 Jul 1996 20:41:49 -0700
Organization: dis.
Lines: 50
Sender: fn@LISP-READER.csrv.uidaho.edu
Distribution: world
Message-ID: <nfivbo985e.fsf@LISP-READER.csrv.uidaho.edu>
References: <4s88g3$krt@usenet.srv.cis.pitt.edu>
NNTP-Posting-Host: lisp-reader.csrv.uidaho.edu
Mime-Version: 1.0
Content-Type: text/plain; charset=US-ASCII
Content-Transfer-Encoding: 7bit
In-reply-to: jlfox+@pitt.edu's message of 13 Jul 1996 13:31:47 GMT
X-Newsreader: Gnus v5.1

In article <4s88g3$krt@usenet.srv.cis.pitt.edu> jlfox+@pitt.edu (James L Fox) writes:
   
   These are my thoughts and things I've tried...
     1.  The problem might have to do with the "nobody" concept.
     2.  I tried a run substituting "username" for "nobody" in
         httpd.config - no difference

This will only work if the server is started as (by) root; I don't believe
you can (as a normal user) set your uid to nobody.


     3.  If cron is using the setuid function of unix it may
         be a problem with AFS.

Could be...I've never used AFS.


     4.  I copied /usr/pitt/etc/httpd to /usr/var/tmp/httpd and did
         "chmod 4755 /usr/var/tmp/httpd", modified start.httpd above
         and kicked cron again. - no difference
     5.  "man crontab" tells me programs will run as the launcher -
         What is going on here???

Write a cron job that gives you the output of `id' and/or of any other
Unix/AFS commands that show exactly whom the system thinks you are.
Compare the output with what the commands say when you run them interactively.


     6.  Is httpd just doing things that make it only approriately
         launched through cron BY root?

I restart an httpd via cron; I don't believe httpd needs to be
started via cron by root only.  However, I am using FreeBSD.


     7.  Am I going to just have to acquire a unix box and set up and
         administer my own web server after all??

This should not be necessary.


What happens if you start it some time later (say, 2:30)?

Can you ktrace/strace the executable while launching from a shell and from
cron, and compare the resulting traces?

Do the cron logs say anything about the jobs?


faried.