Page 1 of 1

User Folder/area - need some guidance plz

Posted: Tue Oct 19, 2010 8:11 am
by mikeman
I would like some advice/methods you would use for a site where once a user has registered, a folder is created on the server where they can upload and store their documents and pictures securely - ie no one else can access them.

I tried making a folder with php and getting php to generate a htaccess and htpasswd file - but I couldn't seem to get this to work very well.

Unfortunately this particular site is on a shared host so I cannot put the files in a folder outside of the public folder which is a method I had read about.

Any guidance would be appreciated.

Re: User Folder/area - need some guidance plz

Posted: Tue Oct 19, 2010 4:36 pm
by greyhoundcode
How about using .htaccess to stop all public access to a specified folder (forget about .htpasswd). The folder, let's call it protected/, would however still be accessible to your own scripts. So you could then have a gateway script accessfile.php that allows logged in users to get to those protected files.

Alternatively, how about storing the files in a database? (Though there could be some performance issues there)