Welcome Guest, Not a member yet? Register   Sign In
Protected directory and force_download
#1

[eluser]night_day[/eluser]
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!
#2

[eluser]InsiteFX[/eluser]
Set your folder permissions with chmod then

Code:
// 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);

InsiteFX
#3

[eluser]night_day[/eluser]
Thanks for the reply, unfortunately, I am running this on Windows and chmod doesn't work.
#4

[eluser]InsiteFX[/eluser]
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.

InsiteFX




Theme © iAndrew 2016 - Forum software by © MyBB