Two files, same permissions, Apache says one is forbidden

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:

https://www.qctonline.com/wp-content/uploads/2021/07/June_16.pdf

https://www.qctonline.com/wp-content/uploads/2021/07/June_23.pdf

https://www.qctonline.com/wp-content/uploads/2021/07/June_30.pdf


Solution 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.