chmod a file so that it can only be executed from the server
Moderator: General Moderators
-
klevis miho
- Forum Contributor
- Posts: 413
- Joined: Wed Oct 29, 2008 2:59 pm
- Location: Albania
- Contact:
chmod a file so that it can only be executed from the server
What rights should I give a file so that it can only be executed from the server?
Re: chmod a file so that it can only be executed from the server
Files are always executed on the server. If you mean you want a file that can't be run by requesting it though a browser, then you need to remove read writes from whatever user Apache runs as. Then, the script will have to be run by a user logged into the server.
Real programmers don't comment their code. If it was hard to write, it should be hard to understand.
-
klevis miho
- Forum Contributor
- Posts: 413
- Joined: Wed Oct 29, 2008 2:59 pm
- Location: Albania
- Contact:
Re: chmod a file so that it can only be executed from the server
I want to run a cron job on a script, but http requests on that scipt shouldnt work
Re: chmod a file so that it can only be executed from the server
It's best to put it outside the document root of the server. Or deny access for the user of the server, allow only for the crondklevis miho wrote:I want to run a cron job on a script, but http requests on that scipt shouldnt work