• Resolved exxis

    (@exxis)


    Hello, I’ve the same problem as here How to Create WooCommerce Secure Downloads I’ve entered the absolute path to the file outsite of the webroot. No spaces in the file.

    I’ve created a test order, the download starts. Filename and extension (.mp4) works fine. But the download starts and aborts right away. So nothing is downloaded. I’ve used the X-Accel-Redirect/X-Senfile method.
    The downloads work in general if I use for example the /uploads folder and enter the file via the media library. But since I want to have it secure, I’m trying the outside of the webroot method.

    Are there some permission I need to set somewhere (on the nginx server for example?)

    Would be nice if someone can help me figure that out.

Viewing 10 replies - 1 through 10 (of 10 total)
  • Thread Starter exxis

    (@exxis)

    no one?

    Thread Starter exxis

    (@exxis)

    Is there any support?

    Moderator Hari Shanker R

    (@harishanker)

    Hi @exxis

    Sorry for the delay in getting back to you on this one.

    It’s interesting that the webroot method does not work for you. Perhaps it has to do with the file permissions that you’ve set for this directory where the file lives?

    If you’ve placed the downloadable files in a separate directory, can you give the 775 permission to the folder and then check if this works?

    Let us know how that went.

    Thread Starter exxis

    (@exxis)

    thank you for your reply, I will try this and get back to you

    Thread Starter exxis

    (@exxis)

    oh forget to ask, do you mean a separate folder inside the uploads folder?

    Thread Starter exxis

    (@exxis)

    It works within the uploads folder of wordpress. But if I go outside of the webroot, then even if I set the permissions to 775 it doesn’t work. Then again, could it be that I have to set some premissions within nginx?

    jessepearson

    (@jessepearson)

    Automattic Happiness Engineer

    @exxis Have you tried to upload the files directly through the product? Adding to the Media Library directly makes the files public. If you upload through the dialog on the product itself in the Downloadable files section, then it will add the file to the woocommerce_uploads folder:


    Link to image: https://cld.wthms.co/8NbQa6

    From here, you could then restrict access to that folder at the server level with the assistance of your host.

    Thread Starter exxis

    (@exxis)

    Hello Jesse,

    yes I’ve tried that, problem here is the files I have are to large. Starting from 6 Gb and the largest are around 15. I’ve set a high enough execution time and also allow to 20gb of filesize to be uploaded to wordpress but still at some point I get random timeouts.
    The outsite of the webroot solution would be the best I think, but I’ve the feeling that because I use ngnix that somewhere there is the problem and I need to change some settings, but I’m not that familiar with ngnix to know what it is.

    jessepearson

    (@jessepearson)

    Automattic Happiness Engineer

    @exxis Have you contacted your host about the timeouts? That would be the next logical step. We’re able to assist if WooCommerce itself is having issues, but it seems like the server is the limitation here if the files randomly stop downloading.

    jessepearson

    (@jessepearson)

    Automattic Happiness Engineer

    @exxis We haven’t heard back from you in a while, so I’m going to mark this as resolved – if you have any further questions, you can start a new thread.

Viewing 10 replies - 1 through 10 (of 10 total)
  • The topic ‘WooCommerce Secure Downloads outsite of webroot’ is closed to new replies.