jdelight
jdelight

Reputation: 143

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 want 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?

Upvotes: 0

Views: 119

Answers (3)

moonshadow
moonshadow

Reputation: 89085

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.

Upvotes: 0

Quentin
Quentin

Reputation: 943615

Just don't put it under your webroot.

Upvotes: 4

Josh Sandlin
Josh Sandlin

Reputation: 714

move it outside of a web accessible dir

Upvotes: 3

Related Questions