Control Web Panel

WebPanel => Apache => Topic started by: changlee on June 23, 2018, 03:58:37 PM

Title: Websites work only with 755 at public_html
Post by: changlee on June 23, 2018, 03:58:37 PM
Hello CWPers!
My website file work only with 755 folder permissions at /public_html

If I modify the /public_html to 750 then I get Forbidden to any /public_html/file.html or .php

What do you suggest?
Title: Re: Websites work only with 755 at public_html
Post by: Gogo on June 23, 2018, 04:04:35 PM
Folders have to be 0755 and files 0644. Instead of 0750 you can block direct access to folders with htaccess.
Title: Re: Websites work only with 755 at public_html
Post by: changlee on June 24, 2018, 08:51:15 AM
So what exactly have I to do with /public_html folder please?
Title: Re: Websites work only with 755 at public_html
Post by: Gogo on June 24, 2018, 10:17:53 PM
What do you want to do with public_html exactly?

You can block access from web with .htaccess like this example stackoverflow (https://stackoverflow.com/questions/17611770/deny-from-all-in-subdirectory-htaccess-not-overriding-file-rules-in-root-htacces?answertab=votes#tab-top)
Title: Re: Websites work only with 755 at public_html
Post by: changlee on June 25, 2018, 06:29:18 AM
Have I to set for /public_html 750 or let it 755 as it is working now?
Title: Re: Websites work only with 755 at public_html
Post by: Gogo on June 25, 2018, 09:44:20 AM
Just leave it as is (755). No need for changes in CWP.
Title: Re: Websites work only with 755 at public_html
Post by: changlee on June 26, 2018, 12:59:39 PM
So it is no problem, for security issues to leave /public_html to 755?

Is it OK?
Title: Re: Websites work only with 755 at public_html
Post by: Gogo on June 27, 2018, 09:47:47 AM
You can leave it as-is. There shouldn't be any problems since it's default CWPs setup.
Title: Re: Websites work only with 755 at public_html
Post by: changlee on July 14, 2018, 08:44:59 AM
I migrated a website to a new CWP installation and it works under 750

I can not understand why the previous installation works only with 755 at /public_html