PDA

View Full Version : Protect a file



Dorphern
10 Jan 2010, 11:58 AM
Hey pros ;P

I'm about to build a site where you can buy files and then download them to your computer.

To do that, the files has to lay on the ftp. The problem is now that, everyone who knows the right path can go and fetch that file. How do you protect it, so that you cannot acces it, directly. Only the php part of my site can?


/Dorphern

Dorphern
10 Jan 2010, 12:12 PM
Hehe, no need to answer :) found the solution by my self.

You just set CHMOD on a folder to 644 (don't allow public) and then acces it via. PHP, buy fx including it :-)