Limit Access to Image Folder

Discussions of secure PHP coding. Security in software is important, so don't be afraid to ask. And when answering: be anal. Nitpick. No security vulnerability is too small.

Moderator: General Moderators

Post Reply
phanky5
Forum Newbie
Posts: 10
Joined: Sun Nov 16, 2008 2:20 pm

Limit Access to Image Folder

Post by phanky5 »

Hi guys.

I am not sure whether or I should post this here. I have a security issue with pictures on my server. I am programming a social networking site. You can upload photo albums on that site too. Now the user can limit access to pictures shown on page. For example photo albums could be set to just be shown to friends of the user.

However I don’t know how I can prevent people from just opening the folder containing the images. This way somebody could get to the pics even though he/she is not allowed to see this pics.

Now my question: How can I prevent people from accessing the image folder? I want these images to only show if they are viewed through my website. I don’t want people to be able to just open the source folder for those images and see everything that’s on there.

What would be the easiest way to accomplish this?

Thank you for your help guys. I hope somebody know the answer to that problem…
User avatar
Syntac
Forum Contributor
Posts: 327
Joined: Sun Sep 14, 2008 7:59 pm

Re: Limit Access to Image Folder

Post by Syntac »

Why did you post this twice?
phanky5
Forum Newbie
Posts: 10
Joined: Sun Nov 16, 2008 2:20 pm

Re: Limit Access to Image Folder

Post by phanky5 »

That was an accident :)
Post Reply