Welcome Guest, Not a member yet? Register   Sign In
Folder permissions
#1

Hello! I developed an application using CI3. In this application, I upload files to /localhost/application/files.
I use GroceryCrud to list download links to the files. Everything OK, I can download with "force_download" function.


But, when I try to embed the file in a view (PDF files) I get :

You don't have permission to access /ci/application/files/03-020-00001-ENC.pdf on this server.

from Apache server (WAMP running on Windows).

I'm looking for advice on how to solve this. Is it unsafe to store files out of "Application" folder?. Is it a best practice?. How can I set permissions to allow my view to get the PDF file?.

Regards.
Reply
#2

For public access they should be stored along side your index.php (or in a folder).
Reply
#3

(This post was last modified: 02-20-2020, 04:57 PM by InsiteFX.)

The error is because CI protects the application folder with a .htaccess file.

You should do like @jreklund told you to do and place the files in the folder
that contains the index.php
What did you Try? What did you Get? What did you Expect?

Joined CodeIgniter Community 2009.  ( Skype: insitfx )
Reply




Theme © iAndrew 2016 - Forum software by © MyBB