• Resolved Jason_K70

    (@jason_k70)


    Hi,

    For some time I have been getting a “Forbidden” error message when clicking on a link to uploaded media files of the type .pptx and .ppt. There don’t seem to be any problems with any other file types, only PowerPoint files. The error message is:

    Forbidden. You don’t have permission to access /wp-content/uploads/…file-name.pptx on this server.

    I’ve checked permissions on all parent folders via FTP and they’re all set at 755. The permissions on the files themselves are 644. I’ve also tried defining a different media upload directory in wp-config.php, in case the original uploads directory had become damaged somehow, but the same problem occurs – all file types were accessible, apart from PowerPoint files.

    Any advise would be gratefully received.
    Thanks
    Jason

Viewing 3 replies - 1 through 3 (of 3 total)
  • Thread Starter Jason_K70

    (@jason_k70)

    For anyone else experienceing this issue, I found the cause. There were a few lines of code in an htaccess file in the uploads directory which were denying access to all file types except those specified. I added ppt and pptx and everything works now.

    Order deny,allow
    Deny from all
    <Files ~ ".(pdf|csv|doc|docx|jpe?g|png|gif|ppt|pptx)$">
    Allow from all
    </Files>

    Hope this helps others.

    Brilliant! Thank you so much. I had an issue with one particular PDF file in my shop. Customers could not download it, even though other files worked perfectly. This code fixed it! I can’t even tell you how relieved I am! Months of headaches gone.

    Thread Starter Jason_K70

    (@jason_k70)

    Glad it helped. I spent such a long time trying to get to the bottom of this, too!

Viewing 3 replies - 1 through 3 (of 3 total)
  • The topic ‘Forbidden access to uploaded PowerPoint files’ is closed to new replies.