Tips and Tricks HQ Support Portal › Forums › WP eStore Forum › Access files in non-web accessible directory
Tagged: file download, non-web accessible, php scripting
- This topic has 8 replies, 3 voices, and was last updated 12 years, 4 months ago by sastone.
-
AuthorPosts
-
July 10, 2012 at 4:41 pm #6854sastoneMember
I have uploaded my file in a directory that is not web accessible, and I would like to know how to configure WP eStore to serve my file so it’s available for downloads.
Could you please help me resolve this issue. I’ve been told it’s something to do with php scripting, but I don’t understand how to do it. I would really appreciate a step by step approach.
Thanks.
July 10, 2012 at 8:50 pm #47193wzpModerator“How” or in what manner is the directory not web accessible?
July 10, 2012 at 8:58 pm #47194sastoneMemberI’ve been informed my web host that the file sits in a directory and while it is web accessible is hidden so users cannot locate it.
I wanted to up the security on my files. I saw a post in this forum and wanted some more information.
Here’s what the post said:
Adding Extra Security Option 3 (Storing Files Outside the Web Accessible Directory)
You can also store the digital goods in a non web accessible directory of your server (outside the “public_html” directory) and use eStore to serve the files. This way no one can even try to fish for it since its not in a web accessible directory.
I don’t know how to do this. I would really appreciate it if you could break it down for me.
July 10, 2012 at 9:01 pm #47195sastoneMemberThe full path is something like /var/www/vhosts/domain.com/products/
July 10, 2012 at 9:58 pm #47196wzpModeratorSince the directory really is “web accessible,” you’d simply enter that accessible URL path to the file, into the product URL field. You can also use a relative “dot dot slash” style file path in the product URL field, that leads from the eStore plugin directory, to the actual file.
July 11, 2012 at 12:43 am #47197sastoneMemberI’ve tried what you’ve said but I received the following error when I try the download link:
The file (on the server) containing your download couldn’t be opened.
Could you tell me where I’m going wrong?
The advice I received from someone was:
You can use a php script to server the file from a non web accessible folder. The php can read from a file/folder that can not be accessed from a standard web link.
This sounds like what I’m looking for. The only problem is that I don’t know how to do this.
July 11, 2012 at 4:02 am #47198wzpModeratorEnable the eStore debug logs. Using the Admin Functions page, create and test a link. Then look in the download_manager_debug.log file for the specific failure message.
July 11, 2012 at 4:38 am #47199adminKeymasterJust to add to this post. Please note that storing files in a non web accessible directory means you will need to find out the absolute path of that file yourself. This is something only advanced users can figure out. Each server has different path structure so we have no way of telling you what the correct path is. If you cannot specify the correct path to that file then it won’t work.
Read this post for more details:
https://support.tipsandtricks-hq.com/forums/topic/download-directory-protection
July 11, 2012 at 8:01 am #47200sastoneMemberYay! Great. It worked. I used the absolute path and it worked perfectly. Thank you both so much for your help
-
AuthorPosts
- You must be logged in to reply to this topic.