开发者

How do I protect a shell script from being downloaded?

开发者 https://www.devze.com 2022-12-17 16:25 出处:网络
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

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.

0

精彩评论

暂无评论...
验证码 换一张
取 消