I have two files in a directory that is accessible to the Interent. It's part of a WordPress installation. Here are the directory contents:

# ls -lah
total 11M
-rw-r--r--. 1 apache apache 2.9M Jul  6 01:49 June_16.pdf
-rw-r--r--. 1 apache apache 2.6M Jul  5 14:17 June_23.pdf
-rw-r--r--. 1 apache apache 2.4M Jul  5 14:17 June_30.pdf
... few other files...

They all have the same permissions. Except I can view / download two of the files, but cannot view / download the one of them. For the one I cannot view / download, Apache gives a 403 forbidden failure. It happens for this pdf file no matter what directory I put it in.

On my local machine (MacOs), I can view the file and it's a valid pdf. I also cannot upload this PDF file via the WordPress Media Upload page.

What could be going on here?

Just FYI here are links to the files:




1 Answer 1

  1. Look through your apache access and error logs in /var/logs/, there should be more details there.
  2. Try renaming the file to see if it is name-related. There could be something in your .htaccess that's causing this.
  • The ssl_error_log just complaining about the permissions, not a client denied by server configuration: [Tue Jul 06 03:42:46.151641 2021] [core:error] [pid 29936] (13)Permission denied: [client] AH00132: file permissions deny server access: /var/www/html/web-root-dir/wp-content/uploads/2021/07/June_16.pdf Jul 6, 2021 at 3:43
  • Change file name, issue persists with new filename. Jul 6, 2021 at 3:46
  • My mind is boggled. I was considering malware, since the same file could not be uploaded into the media store page of WordPress. Jul 6, 2021 at 3:58
  • Have you tried saving/exporting the PDF to a new pdf file?
    – d4n3sh
    Jul 6, 2021 at 23:00
  • Yes, I tried that using Mac Preview app. Jul 7, 2021 at 0:15

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .