Unable to add public_html folder to a user group

I am using CyberPanel with OpenLiteSpeed with one domain, like: example.com

If I add a public_html folder of the domain to a user group, the domain starts giving “too many redirects” error. For example:


ls -la /home/example.com


drwxr-x— 6 exam4939 nogroup 4096 Dec 15 09:18 public_html

And when I add public_html folder to a user group exam4939:

chown exam4939:exam4939 /home/example.com/public_html

then the website does not open in browser with ERR_TOO_MANY_REDIRECTS error in chrome.

Is the website behind proxy? Like cloudflare? If so, disable it and see

Also, check code inside your vhost or htaccess file. There maybe unsupported htaccess codes inside it.

You can solve this issue by adding Rewrite rule for your domain inside htaccess.

Hi, thanks for the reply. No, it is not behind a proxy. The website is: https://softsolutionslimited.com The problem persists even when .htaccess is deleted. I think the issue is in OpenLiteSpeed. But the question is how to solve it?

.htaccess or vhost settings needs to be defined or else there will be such errors. Please add htaccess file with default rewrite code

RewriteEngine On
RewriteRule .* - [E=HTTP_AUTHORIZATION:%{HTTP:Authorization}]
RewriteBase /
RewriteRule ^index\.php$ - [L]
RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_FILENAME} !-d
RewriteRule . /index.php [L]

After adding this, restart openlitespeed or the whole server whichever you feel fine.

Thanks for all the help. I am doing it right now. Please stay with me for a mins more.

Its working fine for me now. Please clear browser cache and cookies and try again.