While uploading the files .pptx and .ppt files from WordPress admin dashboard, I was getting the error as below -
Forbidden. You don’t have permission to access /wp-content/uploads/…file-name.pptx on this server.
Solution -
1. Please check the files and directories permission. File permission should be 644 and directory permission should be 755. You can fire below command under cPanel >> File Manager >> public_html to correct the permission -
find . -type d -exec chmod 755 {} \;
find . -type f -exec chmod 644 {} \;
2. Please check the .htaccess file (under cPanel >> File Manager >> public_html ), there should be 'ppt' and 'pptx' extension should be enabled. Below is the code for you which you should add in .htaccess file -
Order deny,allow
Deny from all
<Files ~ ".(pdf|csv|doc|docx|jpe?g|png|gif|ppt|pptx)$">
Allow from all
</Files>
It resolved my issue!