Re: PHP script to only be accessed by cron [message #175266 is a reply to message #175265] |
Wed, 31 August 2011 00:44 |
Peter H. Coffin
Messages: 245 Registered: September 2010
Karma:
|
Senior Member |
|
|
On Tue, 30 Aug 2011 17:23:06 -0700 (PDT), jwcarlton wrote:
> I'm writing a PHP script that I want to ONLY be accessed by a
> predefined cron. Can you guys suggest a way to prevent non-cron
> accesses?
No. But you can make it only accessable to the user who's ID is being
used to run the job by crond. See the documentation for the user
permissions for whatever OS is running thing. On unix-like systems, you
want to look at chmod(1). More detail than this isn't topical for a php
newsgroup, though.
> I wouldn't mind encoding the page, too, JUST in case I have a root
> breach (not expected, of course, but not impossible). Since I would
> only need to encode one page, once, would it be reasonable to use the
> free trial of Zend Guard? Or would you guys suggest something
> different?
Way, way, way too complicated. Stop thinking "page", start thinking
"script file".
--
72. If all the heroes are standing together around a strange device and
begin to taunt me, I will pull out a conventional weapon instead of
using my unstoppable superweapon on them.
--Peter Anspach's list of things to do as an Evil Overlord
|
|
|