Posts: 40
Threads: 7
Joined: Jul 2014
Reputation:
2
Sex: Male
Thanks: 0
Given 3 thank(s) in 2 post(s)
[Not Solved]
Forbidden You don't have permission to access / on this server.
04-12-2015, 02:17 AM
(This post was last modified: 04-13-2015, 06:32 PM by dipakcg.)
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.
Posts: 4 096
Threads: 233
Joined: Jul 2014
Reputation:
89
Sex: Undisclosed
Thanks: 61
Given 431 thank(s) in 392 post(s)
[Not Solved]
RE: Forbidden You don't have permission to access / on this server.
04-12-2015, 02:29 AM
Any new module install? Custom settings there?
M B
Posts: 40
Threads: 7
Joined: Jul 2014
Reputation:
2
Sex: Male
Thanks: 0
Given 3 thank(s) in 2 post(s)
[Not Solved]
RE: Forbidden You don't have permission to access / on this server.
04-12-2015, 02:34 AM
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.
Posts: 4 096
Threads: 233
Joined: Jul 2014
Reputation:
89
Sex: Undisclosed
Thanks: 61
Given 431 thank(s) in 392 post(s)
[Not Solved]
RE: Forbidden You don't have permission to access / on this server.
04-12-2015, 02:40 AM
owner should be apache:apache take care for that
Posts: 40
Threads: 7
Joined: Jul 2014
Reputation:
2
Sex: Male
Thanks: 0
Given 3 thank(s) in 2 post(s)
[Not Solved]
RE: Forbidden You don't have permission to access / on this server.
04-12-2015, 03:49 AM
(This post was last modified: 04-12-2015, 03:49 AM by dipakcg.)
M B,
Yes, it is apache:apache.
Posts: 40
Threads: 7
Joined: Jul 2014
Reputation:
2
Sex: Male
Thanks: 0
Given 3 thank(s) in 2 post(s)
[Not Solved]
RE: Forbidden You don't have permission to access / on this server.
04-12-2015, 03:59 AM
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.
Posts: 40
Threads: 7
Joined: Jul 2014
Reputation:
2
Sex: Male
Thanks: 0
Given 3 thank(s) in 2 post(s)
[Not Solved]
RE: Forbidden You don't have permission to access / on this server.
04-12-2015, 04:04 AM
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
Posts: 4 096
Threads: 233
Joined: Jul 2014
Reputation:
89
Sex: Undisclosed
Thanks: 61
Given 431 thank(s) in 392 post(s)
[Not Solved]
RE: Forbidden You don't have permission to access / on this server.
04-12-2015, 12:33 PM
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
Posts: 40
Threads: 7
Joined: Jul 2014
Reputation:
2
Sex: Male
Thanks: 0
Given 3 thank(s) in 2 post(s)
[Not Solved]
RE: Forbidden You don't have permission to access / on this server.
04-12-2015, 01:12 PM
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.
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.
Posts: 40
Threads: 7
Joined: Jul 2014
Reputation:
2
Sex: Male
Thanks: 0
Given 3 thank(s) in 2 post(s)
[Not Solved]
RE: Forbidden You don't have permission to access / on this server.
04-12-2015, 06:30 PM
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.
|