Page 1 of 1
How to secure images folder
Posted: Wed Mar 30, 2011 8:27 am
by rashidfarooq
I have an images folder in my root. I have to upload the images to this directory and after that access the images from it. How can I make it secure so that, No one can overwrite or delete the images from this directory.
I will be thankful for your answers.
Re: How to secure images folder
Posted: Wed Mar 30, 2011 11:07 am
by Mordred
If noone else but you will do the uploading, a simple password field in the upload form and a hardcoded check in the PHP source will be a perfect solution.
Re: How to secure images folder
Posted: Wed Mar 30, 2011 11:23 am
by rashidfarooq
Mordred wrote:If noone else but you will do the uploading, a simple password field in the upload form and a hardcoded check in the PHP source will be a perfect solution.
But will my directory be secure from outside access (mean what about if some one upload files from his own script and try to overwrite my images?)
Re: How to secure images folder
Posted: Wed Mar 30, 2011 12:06 pm
by Mordred
This would be possible only if:
1) You have a buggy and publicly accessible upload script (the one you're talking about, or another one).
2) You are on a badly misconfigured shared hosting and someone with an account on the same server as you would be able to write in your folder.
Otherwise, there's nothing to fear.
Re: How to secure images folder
Posted: Wed Mar 30, 2011 1:53 pm
by rashidfarooq
Thanks a lot brother for answering my problem. I have understood the concept.