[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[cobalt-users] Running lynx from cron to run php script



I want to use cron to run a script like the following.

01,15,30,45 * * * * root TERM=xterm; export TERM; /usr/bin/lynx -dump
http://files.fmmetrocog.org/weather/weather.php > /dev/null 2>&1

My question is what permissions would be giving to the script?  I am having
one person tell me that by doing it this way, the php script is running with
root permission.  The php script accesses another site and parses the file
for the weather info and saves it.

Below are my log files of the scripts in action.

Cron calling the php script
www.domain.com 208.155.68.63 - - [10/Dec/2002:10:45:05 -0600] "GET
/folder/client/weather.php HTTP/1.0" 200 2 "-" "Lynx/2.8.3dev.18
libwww-FM/2.14"

The php script calling for the weather file
www.domain.com 208.155.68.63 - - [10/Dec/2002:10:45:05 -0600] "GET
/cgi-bin/weather/hw3.cgi?config=&forecast=zandh&pands=58104&Submit=GO
HTTP/1.0" 200 20847 "-" "PHP/4.1.2"


If this is actually being ran with root permissions, can I change the user
in the cron script from root to something else?  If so what user would be
safe?  The site admin does not have shell access.

Thanks.


--