cooldude832 Posted September 10, 2008 Share Posted September 10, 2008 I have my cron located at (http://www.mysite.com/cron.php) and I want to lock it down so only the server can run it I tried doing chmod(500) on it but then the server couldn't do it chmod(501) gave me remote access to it also Link to comment https://forums.phpfreaks.com/topic/123621-locking-a-cron-file-from-outside-use/ Share on other sites More sharing options...
lanmonkey Posted September 10, 2008 Share Posted September 10, 2008 this is more a server managment issue, not php but what you want to do is move the php file below your public_html folder so its not available from the internet. then call the file using the absolute server patch eg: /home/myaccount/myfile.php you could also do it using a htaccess file to lock down access to the file but the above way is the safest because they would have to obtain your hosting account password to get at the file. Link to comment https://forums.phpfreaks.com/topic/123621-locking-a-cron-file-from-outside-use/#findComment-638389 Share on other sites More sharing options...
cooldude832 Posted September 10, 2008 Author Share Posted September 10, 2008 well I am running it via LYNX and it is managed through my CMS so I can't put it below my web directory. Link to comment https://forums.phpfreaks.com/topic/123621-locking-a-cron-file-from-outside-use/#findComment-638390 Share on other sites More sharing options...
lanmonkey Posted September 10, 2008 Share Posted September 10, 2008 well I am running it via LYNX and it is managed through my CMS so I can't put it below my web directory. then create a folder called "cron" or somthign like that and put a htaccess file in it that limits access to localhost (or 127.0.0.1, same thing) google is you best freind here Link to comment https://forums.phpfreaks.com/topic/123621-locking-a-cron-file-from-outside-use/#findComment-638396 Share on other sites More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.