Noob question - how to best secure automation scripts that run on cron?

Jondoe0069

New member
Mar 21, 2007
1,317
19
0
Estados Unidos
I normally just get out of the box automation stuff for Wordpress and whatnot and don't pay much attention to how and where the scripts that scrape and populate are stored and who or what has rights to execute them (normally I can just do it in the browser, so I don't think it's secured)

Anyway - I've been having various custom scripts built to run with cron jobs to do tasks like data population, clean up, etc. and I'm curious if there is some best practice for ensuring that they aren't accidentally found and/ or run? Is it safe to just leave them in a directory that isn't linked to from anywhere?

I am assuming you're going to tell me to just give execute permissions for the directory to the system. Correct?

Sorry for such a noob question.

Any help is appreciated! Thanks!