Lou Carey Posted May 22, 2009 Share Posted May 22, 2009 Hi All,I will be writing a CRON script to update inventory and wish to know if there are particular security measures I should/must follow in order to avoid intrusions? Are there any examples of the current code I can use as an outline/starting point for the security portion of the CRON script?Thank you for your time,Lou Carey Link to comment Share on other sites More sharing options...
Burhan BVK Posted May 23, 2009 Share Posted May 23, 2009 The best way is to not put it in your public_html folder, put it somewhere below that, no one will be able to access it. Link to comment Share on other sites More sharing options...
Robert G. Posted May 23, 2009 Share Posted May 23, 2009 And avoid running it as root (if you have that access anyway). Link to comment Share on other sites More sharing options...
Lou Carey Posted May 23, 2009 Author Share Posted May 23, 2009 Thank you whitelighter and _robert for your advice! Link to comment Share on other sites More sharing options...
ruilong Posted May 24, 2009 Share Posted May 24, 2009 Also, I can recommend you make a "password" that you store in the database. Link to comment Share on other sites More sharing options...
Lou Carey Posted May 24, 2009 Author Share Posted May 24, 2009 Hi ruilong,Could you tell me how I would you the password in the database?Thanks! Link to comment Share on other sites More sharing options...
ruilong Posted May 24, 2009 Share Posted May 24, 2009 use Configure class.Configure::UpdateValue('NAME OF VALUE', 'password'); to set it from an textbox in configure (if this is a module) (I may be a bit off on the code since I write from my head now ) then in the cron execution file you get that value from the database Configure::GetValue('NAME OF VALUE'); and compare it to $_GET['password']in the cronsetup you then set file.php?password=password Link to comment Share on other sites More sharing options...
Lou Carey Posted May 24, 2009 Author Share Posted May 24, 2009 Hi ruilong,Thank you, your suggestion and explanation are well understood and helpful!Lou Link to comment Share on other sites More sharing options...
Recommended Posts
Create an account or sign in to comment
You need to be a member in order to leave a comment
Create an account
Sign up for a new account in our community. It's easy!
Register a new accountSign in
Already have an account? Sign in here.
Sign In Now