• The Horde webmail has been deprecated. Its complete removal is scheduled for April 2025. For details and recommended actions, see the Feature and Deprecation Plan.
  • We’re working on enhancing the Monitoring feature in Plesk, and we could really use your expertise! If you’re open to sharing your experiences with server and website monitoring or providing feedback, we’d love to have a one-hour online meeting with you.

Issue 403 errors on CSS and Media files and pcfg_openfile: unable to check htaccess file

jmano

New Pleskian
Hello,

i am trying to move my magento 1.9 shop from my old server (Centos 6 w. Plesk 12.5.3 running php 5.33 as apache module) to a new server (Centos 7 with Plesk 12.5.3 and php 5.6.26 running as FPM application served by apache).

The site works fine except for all stylesheets, images and javascripts. When i try to open a CSS file or image URL directly i get a 403 forbidden error. The permissions for files and folders and user/group settings are all correct as they should be as far as i can tell. The folders in question all have 500 permissions and the files (css/img/js) are 400.

In the logs i find loads of errors like this:

Code:
AH00529: /var/www/vhosts/mywebroot/skin/.htaccess pcfg_openfile: unable to check htaccess file, ensure it is readable and that '/var/www/vhosts/mywebroot/skin/' is executable, referer: http://mywebroot/

the errors concern everything from the /skin , /media and /js folders. These folders do not even have .htaccess files btw.

I tried searching for a solution for hours now and am not getting anywhere.

I double checked all the configurations in the Plesk panels of both servers and everything is identical as far as i can tell.

The only thing that is different on the new server is the Centos version (RHEL7 on the new server, RHEL6 on the old one), the php version and that i am running PHP as FPM instead of an apache module.

I have to admit that i'm new to PHP FPM and i suspect that this is the culprit but as mentioned before i'm totally lost as to what the problem could be.
 
hey thx, i ran:

find ./ -type f | xargs chmod 644

and

find ./ -type d | xargs chmod 755

and now it works.

what i really don't understand is why this doesn't work with the same permissions as on the old system. I am using the exact same version of Plesk and only the php and apache versions (2.4 vs 2.2) and the fact that im running as FPM and not as a module.
 
Because security reason :) 777 or 775 was not safe.

huh ???

old system: RHEL6, PHP5.3, apache 2.2, mod_php -> 500/400 (more secure) -> works

new system: RHEL7, php 5.6, apache 2.4, php FPM - > 500/400 (more secure) - > doesn't work -> only less secure 755/644 works

so what gives ?
 
Back
Top