This forum uses cookies
This forum makes use of cookies to store your login information if you are registered, and your last visit if you are not. Cookies are small text documents stored on your computer; the cookies set by this forum can only be used on this website and pose no security risk. Cookies on this forum also track the specific topics you have read and when you last read them. Please confirm whether you accept or reject these cookies being set.

A cookie will be stored in your browser regardless of choice to prevent you being asked this question again. You will be able to change your cookie settings at any time using the link in the footer.

Forbidden You don't have permission to access / on this server.
#1
[Not Solved] Forbidden You don't have permission to access / on this server.
Hello Support,

I don't know what happened suddenly but all of the sites hosted on zPanel started to give following error:

Forbidden
You don't have permission to access / on this server.
Additionally, a 403 Forbidden error was encountered while trying to use an ErrorDocument to handle the request.

Additionally, when I try to create a sub-domain, and select "Use existing home directory", I don't see any directory list except /(root).

Any quick help will be highly appreciated.

Thanks advance,

~ Dipak G.
Reply
Thanks given by:
#2
[Not Solved] RE: Forbidden You don't have permission to access / on this server.
Any new module install? Custom settings there?

M B
No support using PM (Auto adding to IGNORE list!), use the forum. 
How to ask
Freelance AWS Certified Architect & SysOps// DevOps

10$ free to start your VPS

Reply
Thanks given by:
#3
[Not Solved] RE: Forbidden You don't have permission to access / on this server.
M B,

Thanks for your prompt response.

Actually I tried to create a sub-domain but by mistake set "Create a new home directory" rather than "Use existing home directory", and that's why it created a new directory (eg.: subdomain_domain_com) under public_html which I removed manually via SSH.

What should be the correct permissions / directory owners? I can see all of the site directories inside public_html has apache : apache permissions.

Many thanks,

Kind regards,
~ Dipak G.
Reply
Thanks given by:
#4
[Not Solved] RE: Forbidden You don't have permission to access / on this server.
owner should be apache:apache take care for that
No support using PM (Auto adding to IGNORE list!), use the forum. 
How to ask
Freelance AWS Certified Architect & SysOps// DevOps

10$ free to start your VPS

Reply
Thanks given by:
#5
[Not Solved] RE: Forbidden You don't have permission to access / on this server.
M B,

Yes, it is apache:apache.
Reply
Thanks given by:
#6
[Not Solved] RE: Forbidden You don't have permission to access / on this server.
M B,

I just noticed that FTP also stopped to work, and gives "Server said: Login incorrect.".

All files seems ok (undeleted) when I check it via SSH, so I guess this has something to do with permissions?

Many thanks,

Kind regards,
~ Dipak G.
Reply
Thanks given by:
#7
[Not Solved] RE: Forbidden You don't have permission to access / on this server.
Sample contents of /etc/zpanel/configs/apache/httpd-vhosts.conf


Code:
# DOMAIN: mydomain.com
<virtualhost *:80>
ServerName mydomain.com
ServerAlias mydomain.com www.mydomain.com
ServerAdmin hosting@mydomain.com
DocumentRoot "/var/zpanel/hostdata/zadmin/public_html/mydomain_com"
php_admin_value suhosin.executor.func.blacklist "passthru, show_source, shell_exec, system, pcntl_exec, popen, pclose, proc_open, proc_nice, proc_terminate, proc_get_status, proc_close, leak, apache_child_terminate, posix_kill, posix_mkfifo, posix_setpgid, posix_setsid, posix_setuid, escapeshellcmd, escapeshellarg, exec"
rrorLog "/var/zpanel/logs/domains/zadmin/mydomain.com-error.log"
CustomLog "/var/zpanel/logs/domains/zadmin/mydomain.com-access.log" combined
CustomLog "/var/zpanel/logs/domains/zadmin/mydomain.com-bandwidth.log" common
<Directory />
Options FollowSymLinks Indexes
AllowOverride All
Order Allow,Deny
Allow from all
</Directory>
AddType application/x-httpd-php .php3 .php
ScriptAlias /cgi-bin/ "/_cgi-bin/"^M
<location /cgi-bin>^M
AddHandler cgi-script .cgi .pl^M
Options ExecCGI -Indexes^M
</location>
ErrorDocument 500 /_errorpages/500.html
ErrorDocument 404 /_errorpages/404.html
ErrorDocument 510 /_errorpages/510.html
ErrorDocument 403 /_errorpages/403.html
DirectoryIndex index.html index.htm index.php index.asp index.aspx index.jsp index.jspa index.shtml index.shtm
# Custom Global Settings (if any exist)

# Custom VH settings (if any exist)

</virtualhost>
# END DOMAIN: mydomain.com
Reply
Thanks given by:
#8
[Not Solved] RE: Forbidden You don't have permission to access / on this server.
Vhost looks ok and error access denied with FTP error that's strange. Check again what you did may be you deleted the user root?

chown -R apache:apache /var/zpanel/hostdata/username

Ensure using -R

M B
No support using PM (Auto adding to IGNORE list!), use the forum. 
How to ask
Freelance AWS Certified Architect & SysOps// DevOps

10$ free to start your VPS

Reply
Thanks given by:
#9
[Not Solved] RE: Forbidden You don't have permission to access / on this server.
M B,

I was checking directory permissions and found that the permissions for "hostdata" (/var/zpanel/hostdata) folder was drw------- (was looking different than others), so I tried to run chmod 770 hostdata command and now hostdata folder permissions looks drwxrwx---, and sites are up again and FTP has started to work as well. Smile 

User zadmin (/var/zpanel/hostdata/zadmin) looks like following...
drwxrwx--- 6 apache apache 4096 Jun 22  2014 zadmin

Permissions for public_html (/var/zpanel/hostdata/zadmin/public_html) looks like following...
drwxrwx--x 6 apache apache 4096 Apr 11 13:51 public_html

Is the permissions are ok (standard) for the mentioned folders or have you any suggestions?

Thank you so much for being with me during this critical issue.

Kind regards,
~ Dipak G.
Reply
Thanks given by:
#10
[Not Solved] RE: Forbidden You don't have permission to access / on this server.
I've noticed one weird thing, and not sure whether it has something to do with the above issue or not?

Module mysql_users stopped to work, and I am unable to create new users as well as unable to assign a database to the current users.

It display a blank page (on submit) and when I refresh the page, it shows "Application Error: [0204] - The form you attempted to submit had an invalid token!".

Any quick help will be highly appreciated.

Kind regards,
~ Dipak G.
Reply
Thanks given by:


Possibly Related Threads...
Thread Author Replies Views Last Post
How to change dashboard access? donaldashley 1 442 03-01-2021, 12:56 AM
Last Post: spoonman
Lost complete access to ZpAnel & backend of website Sal123 0 1 513 09-05-2019, 10:33 PM
Last Post: Sal123
Block the Sentora/zPanel login page for all undefined subdomain or direct IP access TGates 12 25 904 07-31-2019, 08:46 AM
Last Post: TGates

Forum Jump:


Users browsing this thread: 1 Guest(s)