How do I protect a shell script from being downloaded?
I have a shell script which is called by a cron job. I don't wan开发者_如何学编程t it to be downloaded via a browser. I have tried the filesmatch htaccess directive but that doesn't seem to stop me calling the url of the file and downloading it.
How can I protect it?
Just don't put it under your webroot.
move it outside of a web accessible dir
Move it out of the directory tree the webserver is serving from. If it's not being invoked by the webserver, it doesn't need to be there.
精彩评论