Forbidden on all new virtual servers

Operating system: Centos
OS version: 8
Virtualmin: 6.12

I’m adding a second virtualmin (gpl) server and receiving 403 Forbidden on all new virtual servers created.

If I change permission to 755 recursively on the new site, all works fine.

I’ve attempted: Adding 755 to the /home folder, but new servers default back to 750.

So my questions are:

  1. Is manually changing the permissions from 750 to 755, the proper fix?
  2. Is there a permanent fix so no manual intervention is needed?

Appreciate any guidance here!

–Ken

Are there index files in the root? The 403 usually comes up when there’s no index page in public_html and directory listing is forbidden in .htaccess.

Richard

1 Like

Thanks Richard for that.

Yes the boilerplate virtualmin index.html is in the public_html folder. Changing the folder and file permissions fixes the issue, however I’m trying to avoid having to modify the permissions every time I create a new virtual server.

I’m still blocked on this…can’t figure out where the issue lies. Every new virtual host is created with 750 permissions, and all visits to url’s in that new virtual host result in a 403 (navigating to an existing file).

If I manually modify to 755, everything works from there on out.

Can anybody guide me on how to change the default permission for apache virtual host folders, without having to explicitly set the permission in the template and thus having to create a custom set of apache directives?

I’m actually not understanding why 750 does not work as well – by running under the user account and group, shouldn’t 750 allow access to html files?

Ken, are these migrated domains by any chance?

I had a similar problem with one migrated domain a couple of weeks ago, but didn’t bother troubleshooting it because it was a small static site and there were no databases and no important mail to worry about. I just re-created it and re-uploaded it.

Richard

1 Like

Hey Richard,

No, not migrated. This is brand new Google Cloud Centos 8 instance, immediate Virtualmin installation, and then this persistent permissions problem with virtual hosts. I have a long running Centos 7 installation working well, and I’m not sure what is different here?