How to protect folders from access?

Posted In Random
  • sam-detavernier 2 years ago
    Hello,
    
    I'm running Pixel 2.
    How would I best protect my folders from user access? Because now you can just go to http://myurl.com/storage/downloads and just download everything.
    
    I tried changing permissions to 0770 but I can't download the file the normal way then.
    
    Is adding a index.html file with a redirect to my homepage into every single folder the only solution?

    Hello,

    I'm running Pixel 2. How would I best protect my folders from user access? Because now you can just go to http://myurl.com/storage/downloads and just download everything.

    I tried changing permissions to 0770 but I can't download the file the normal way then.

    Is adding a index.html file with a redirect to my homepage into every single folder the only solution?

  • sam-detavernier 2 years ago
    I also get these errors when I try to view a download from the admin panel:
    1/2
    ErrorException in 30757418b4ced87bc5d5234765313ef239c79041.php line 52:
    Invalid argument supplied for foreach()
    2/2
    ErrorException in 30757418b4ced87bc5d5234765313ef239c79041.php line 52:
    Invalid argument supplied for foreach() (View: /home/public_html/application/vendor/tcg/voyager/resources/views/bread/read.blade.php)
    
    And when I try to upload file trough the admin panel I get this error (straight after the file is uploaded):
    Whoopsie
    Whoops, looks like something went wrong.
    
    1/1
    PostTooLargeException in ValidatePostSize.php line 24:
    in ValidatePostSize.php line 24
    at ValidatePostSize->handle(object(Request), object(Closure)) in Pipeline.php line 148
    at Pipeline->Illuminate\Pipeline\{closure}(object(Request)) in Pipeline.php line 53
    at Pipeline->Illuminate\Routing\{closure}(object(Request)) in CheckForMaintenanceMode.php line 46
    at CheckForMaintenanceMode->handle(object(Request), object(Closure)) in Pipeline.php line 148
    at Pipeline->Illuminate\Pipeline\{closure}(object(Request)) in Pipeline.php line 53
    at Pipeline->Illuminate\Routing\{closure}(object(Request)) in Pipeline.php line 102
    at Pipeline->then(object(Closure)) in Kernel.php line 149
    at Kernel->sendRequestThroughRouter(object(Request)) in Kernel.php line 116
    at Kernel->handle(object(Request)) in index.php line 54

    I also get these errors when I try to view a download from the admin panel: 1/2 ErrorException in 30757418b4ced87bc5d5234765313ef239c79041.php line 52: Invalid argument supplied for foreach() 2/2 ErrorException in 30757418b4ced87bc5d5234765313ef239c79041.php line 52: Invalid argument supplied for foreach() (View: /home/public_html/application/vendor/tcg/voyager/resources/views/bread/read.blade.php)

    And when I try to upload file trough the admin panel I get this error (straight after the file is uploaded): Whoopsie Whoops, looks like something went wrong.

    1/1 PostTooLargeException in ValidatePostSize.php line 24: in ValidatePostSize.php line 24 at ValidatePostSize->handle(object(Request), object(Closure)) in Pipeline.php line 148 at Pipeline->Illuminate\Pipeline{closure}(object(Request)) in Pipeline.php line 53 at Pipeline->Illuminate\Routing{closure}(object(Request)) in CheckForMaintenanceMode.php line 46 at CheckForMaintenanceMode->handle(object(Request), object(Closure)) in Pipeline.php line 148 at Pipeline->Illuminate\Pipeline{closure}(object(Request)) in Pipeline.php line 53 at Pipeline->Illuminate\Routing{closure}(object(Request)) in Pipeline.php line 102 at Pipeline->then(object(Closure)) in Kernel.php line 149 at Kernel->sendRequestThroughRouter(object(Request)) in Kernel.php line 116 at Kernel->handle(object(Request)) in index.php line 54

  • mark 2 years ago
    Now I dont have a copy of Pixel 2 myself, so my help is limited, but you can also disable directory listings.
    https://stackoverflow.com/questions/2530372/how-do-i-disable-directory-browsing
    
    But then people will still be able to download the files once they know the full path for the file.
    Then you could move the downloads to a directory out of the public, and make a PHP script to only allow downloading of when certain criterias are filled.
    
    I hope this helps.

    Now I dont have a copy of Pixel 2 myself, so my help is limited, but you can also disable directory listings. https://stackoverflow.com/questions/2530372/how-do-i-disable-directory-browsing

    But then people will still be able to download the files once they know the full path for the file. Then you could move the downloads to a directory out of the public, and make a PHP script to only allow downloading of when certain criterias are filled.

    I hope this helps.

  • sam-detavernier 2 years ago
    Thanks, glad you're here, atleast someone providing support. Still waiting on the material theme aswell...

    Thanks, glad you're here, atleast someone providing support. Still waiting on the material theme aswell...

  • mark 2 years ago
    Material theme? Not sure I follow?

    Material theme? Not sure I follow?

  • noah-logue 5 months ago
    Protection is the basic necessity that have to be cared for saving your data. Mostly I am using this [essay writing help](https://www.essayontime.co.uk/) to grab the identical things to fulfill demands.

    Protection is the basic necessity that have to be cared for saving your data. Mostly I am using this essay writing help to grab the identical things to fulfill demands.

Please login or signup to leave a response.

Login

or Sign Up

Sign Up

or Login
×
tnylea
Cheers Friend!

I'm Tony, the creator of this site. I'm trying to increase my twitter following. Want to follow me?

Follow @tnylea If not, no worries :)