0

I have an html page where a user can see view their course certificates when they click on "View Certificate", am using PHP for backend. The certificates are stored in the D drive because of more storage capacity. When the link is clicked I get the message "Access forbidden! You don't have permission to access the requested object. It is either read-protected or not readable by the server."

The URL does show the path to the certificate "site.org/courses/certificate/file:/D:/courses/uploads/5fcffcb32e2201.64085268.pdf" - it just doesn't load the certificate because of the lack of permissions.

So how do I grant permissions for the web server to access that folder on a different drive?

JDeLeon
  • 9
  • 4
  • actually it looks like the path itself is wrong, if you want to view the certificate you must place it in the server directory instead of placing it somewhere else on the system. could you please specify whether you are running it on localhost (using WAMP,XAMPP etc..) or on an actual hosting server – trickymind Nov 10 '21 at 16:38
  • See https://askubuntu.com/questions/325498/apache-cant-access-folders-in-my-home-directory Adjust Directory to your needs. – Ярослав Рахматуллин Nov 10 '21 at 17:06
  • Does this answer your question? [Make XAMPP / Apache serve file outside of htdocs folder](https://stackoverflow.com/questions/1408/make-xampp-apache-serve-file-outside-of-htdocs-folder) – Ярослав Рахматуллин Nov 10 '21 at 17:07
  • Yes, that answered my question, thank you for your help. – JDeLeon Nov 13 '21 at 11:47

0 Answers0