You don’t have permission to access file from Woocommerce

Sometimes people use WooCommerce to make a shop handling digital downloads, where customers can purchase a digital product and then download the file, once they have paid. But then when they try to download the file, they get the error message:

You don’t have permission to access /wp-content/uploads/woocommerce_uploads/2014/09/file.zip on this server.

In this article I will explain why and how to solve it. The reason for this error message, is that there is a .HTACCESS file in the folder:

/wp-content/uploads/woocommerce_uploads/

Which contains:

deny from all

So this prevents the customer from downloading the file. This is not the purpose with a woocommerce digitial download to prevent customers from downloading there products. Therefore you can solve the problem by simply deleting this .HTACCESS file.

0 0 votes
Article Rating

Andreas Andersen

Forfatter og grundlægger af IT-blogger.dk, der har blogget om IT-emner siden 2012. Findes på Mastodon på @aphandersen@ansico.dk

Abonner
Giv besked ved
guest

4 Comments
mest stemt på
nyeste ældste
Inline Feedbacks
View all comments
Rich siger:

Thank you for this post. Deleting the .HTACCESS file solves the problem, but the .HTACCESS file seems to eventually reappear. Is there a way to stop the .HTACCESS file from being automatically re-created once it has been deleted?

Chris siger:

Rich, you need to change the download type from “Forced Downloads” to “Redirect Only” from Woo Commerce -> Settings -> Products -> Digital Downloads.

@ Andreas. That solves the issue but does not solve the issue that once a client purchases a digital product he can freely share around your link and everyone can download for free. Is there another solution which can be done in order to prevent this?

Thanks

gabriel siger:

Tank’s Chris… I changed to “redirect only” and worked 🙂

Hej Andreas

TAK for din beskrivelse af dette åbenbart gamle WooCommerce-problem, som har drillet mig de sidste par dage.

Når mine kunder downloader fra min side, kommer beskeden: You don’t have permission to access /wp-content/uploads/edd/2018/11/Sport-Wortschatz-und-Aktivitäten.pdf on this server.

Jeg bruger “redirect only”, så fejlen må ligge ved htacces-filen……. Og her er jeg for meget amatør. Jeg kan simpelthen ikke finde den fil, der burde slettes.

Håber, du stadig har tid til at hjælpe.

mvh. Elsebeth

4
0
Would love your thoughts, please comment.x
()
x