4

First of all, I will mention that the permissions are fine for the document root directory, which is

/webapps/nimbus/www/public_html

The www directory contains a PHP application. PHP is a problem for later if it doesn't work, as I've tested it with a plain html file (does not work either)

I just get 403 forbidden responses.

The permissions are 755 on webapps and all subdirectories.

I've checked other questions here and on the internet, but it was all about those permissions. Whatever info you still need, just ask, I don't know what's relevant as it's the first time ever I'm using webmin or configuring apache.

MarioDS
  • 223
  • 2
  • 4
  • 15

2 Answers2

4

This will most likely be SELinux. You will need to ensure that the files you want to serve have a security context of httpd_sys_content_t try

chcon -Rv --type=httpd_sys_content_t /webapps

Which will set the correct security context.

user9517
  • 114,104
  • 20
  • 206
  • 289
  • 1
    If it turns out to be SELinux, this is only a temporary fix. See [this answer for a permanent solution](http://serverfault.com/a/409488/126632). – Michael Hampton Oct 23 '12 at 15:19
  • @MichaelHampton and lain, thanks for the answer. The question that Michael has linked to, has one thing in common: webapps is under root directory. I will try to modify it for SELinux when I get the chance (I don't have access to the server atm) and I will inform you of the results. – MarioDS Oct 23 '12 at 15:27
  • @MarioDeSchaepmeester Yes, my answer should work fine for you if it's an SELinux issue (and it probably is). – Michael Hampton Oct 23 '12 at 15:29
-1

Do the directory and the files have the same owner as the Apache's user ?

I don't know about Centos but I would do that on Ubuntu

chown -R www-data:www-data /webapps/nimbus/www/public_html
DJYod
  • 346
  • 1
  • 4
  • 15