-3

I have a website and I am trying to link an image stored in a directory, however when I change the file permissions to 775 they change back to 644 and the image isn't displaying. It is showing a Error 403 Forbidden error

My .htaccess is

RewriteEngine on
RewriteCond %{HTTPS} off
RewriteCond %{HTTP:X-Forwarded-Proto} !https
RewriteRule ^(.*)$ https://%{HTTP_HOST}%{REQUEST_URI} [L,R=301]

RewriteRule .*\.()$ - [F,NC]

RewriteCond %{HTTP_REFERER} !^http://coolio85.com/.*$      [NC]
RewriteCond %{HTTP_REFERER} !^http://example.com$      [NC]
RewriteCond %{HTTP_REFERER} !^http://www.example.com/.*$      [NC]

RewriteCond %{HTTP_REFERER} !^http://www.example.com$      [NC]
RewriteCond %{HTTP_REFERER} !^https://example.com/.*$      [NC]
RewriteCond %{HTTP_REFERER} !^https://example.com$      [NC]
RewriteCond %{HTTP_REFERER} !^https://www.example.com/.*$      [NC]
RewriteCond %{HTTP_REFERER} !^https://www.example.com$      [NC]
RewriteRule ^html/(.*)$ /$1 [L,NC,R]
RewriteRule .*\.(jpg|jpeg|gif|png|bmp)$ - [F,NC]

1 Answers1

1

Files shouldn't have 775 permissions unless they really are executable files.

You need to check your directory permissions from root up to the level of the directory which contains the file, and make sure the eXecute bit is set on those directories for the owner / group / other parties.

Tero Kilkanen
  • 34,499
  • 3
  • 38
  • 58