apache.htaccesspermissionschmodchown

Apache - Permissions are missing on a component of the path


None of my website images are loaded, although paths are correct. In my Apache logs, I have plenty of :

(13)Permission denied: [client 87.231.108.18:57108] AH00035: access to 
my/file/path/some-photo.jpg denied because search permissions are missing 
on a component of the path

Within httpd.conf file :

User apache
Group apache

All the way down to my website directory, folders are owned by apache:apache, with chmod set to 774 all the way down.

SELinux boolean httpd_can_network_connect has been is On.

I am using a .htaccess file to redirect my domain name to the appropriate directory. I suspect this might be cause the issue but... this is nothing more than a gut feeling.

I do need help, any suggestion is most welcomed. Many thanks!

EDIT Content of the .htaccess file :

RewriteEngine On
Options +FollowSymLinks

RewriteCond %{HTTP_HOST} ^domain\.com$ [NC]
RewriteRule ^(.*)$ http://www.domain.com/$1 [R=301,L]

RewriteCond %{HTTP_HOST} www\.domain\.com
RewriteRule (.*) /domain/$1 [L]

Solution

  • I finally found it! Thanks a ton Justin lurman to poiting out the .htaccess file. It made me see that Wordpress didn't have the right to edit my .htaccess file anymore. That was even more weird because I was 100% sure that permissions were good (even way too permissive if you ask me).

    So I looked into SElinux, as I know it can play tricks on me at times and I was right. Issuing the following command solved it :

    chcon -R --type=httpd_sys_rw_content_t wp-content/
    

    I hope that helps someone else :)