Page 1 of 1
chmod a file so that it can only be executed from the server
Posted: Wed Jan 06, 2010 6:03 am
by klevis miho
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
Posted: Wed Jan 06, 2010 10:00 am
by pickle
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.
Re: chmod a file so that it can only be executed from the server
Posted: Wed Jan 06, 2010 10:08 am
by klevis miho
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
Posted: Wed Jan 06, 2010 10:19 am
by Darhazer
klevis miho wrote:I want to run a cron job on a script, but http requests on that scipt shouldnt work
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 crond
