Protected directory and force_download

I was reading through the forum on the best way to provide a secure area for uploads that can't get hotlinked. Since I can't access the web root to put another folder there, I am left with putting a folder in the root of my CI installation. From my readings, the best thing to do was to utilize .htaccess to deny all from the folder. When I do this though, I am not able to use force_download to get the file back, am I missing something here? I assume since the deny from all is disallowing that, then how can I read the file back like others had mentioned in previous posts. Thanks!

Set your folder permissions with chmod then

// Read and write for owner, nothing for everybody else
chmod("/somedir/somefile", 0600);

// Read and write for owner, read for everybody else
chmod("/somedir/somefile", 0644);

// Everything for owner, read and execute for others
chmod("/somedir/somefile", 0755);

// Everything for owner, read and execute for owner's group
chmod("/somedir/somefile", 0750);


Thanks for the reply, unfortunately, I am running this on Windows and chmod doesn't work.

Right click on your directory name you should find a security tab there click on that and you can assign different permissions to groups and access.


Digg   Delicious   Reddit   Facebook   Twitter   StumbleUpon  

  Theme © 2014 iAndrew  
Powered By MyBB, © 2002-2021 MyBB Group.