Page 1 of 1

error 403 for locahost [solved]

PostPosted: 19. July 2015 17:36
by duns
Installed xampp-linux-5.5.24-0, installation all right, all right localhost given (opt/lampp/htdocs). When I changed the localhost from "/opt/lampp/htdocs" to /home/schede, then a error message:
"Access forbidden!
You don't have permission to access the requested directory. There is either no index document or the directory is read-protected.
If you think this is a server error, please contact the webmaster.
Error 403".

The problem not solved modifing the "httpd-xampp.conf" and the "httpd-vhosts.conf" files, as suggested in other topics.

Nothing to do, if I link (symlink) home/schede in /opt/lampp/htdocs: same error 403, only for home/schede. Nothing changing the permissions of the folder /home/schede.

In all previous installations all right with the new localhost.

Any idea?

Thak you
Duns

Re: error 403 for locahost

PostPosted: 19. July 2015 18:20
by Nobbie
duns wrote:Nothing changing the permissions of the folder /home/schede.


You also have to change permission for parent folder /home, not only /home/schede.

Re: error 403 for locahost

PostPosted: 19. July 2015 19:13
by duns
Nothing, also changing the permissions for the parent directory :(

Re: error 403 for locahost

PostPosted: 20. July 2015 18:10
by glitzi85
What exactly did you change in the apache config files?
Please execute this command:
Code: Select all
ls -la /home/

and post the output here

Re: error 403 for locahost

PostPosted: 21. July 2015 12:40
by duns
Here:
"[root@localhost ~]# ls -la /home/
total 20
drwxr-xr-x 5 francesco francesco 4096 Jul 17 20:57 ./
drwxr-xr-x 22 root root 4096 Jul 21 12:34 ../
drwx------ 38 francesco francesco 4096 Jul 21 13:37 francesco/
drwxr-xr-x 21 giardino giardino 4096 Nov 27 2014 giardino/
drwxr-xr-x 6 root root 4096 Jun 25 2012 mysql/
lrwxrwxrwx 1 root root 22 Jul 17 20:57 schede -> /home/francesco/schede/"

Thank you

Re: error 403 for locahost

PostPosted: 21. July 2015 14:32
by Nobbie
duns wrote:drwx------ 38 francesco francesco 4096 Jul 21 13:37 francesco/


You said, you changed permissons for your /home/schede. This is very strange, because there is no folder /home/schede, only a folder /home/francesco/schede, but /home/francesco already does not have sufficient rights for Apache. You only put a symbolic link from /home/francesco/schede to /home/schede, but this is still not a folder, only a symbolic link.

You have to grant ALL (i.e. "chmod 0777") rights to

/home
/home/francesco
/home/francesco/schede

otherwise Apache cannot read that folder(s).

Finally you have to apply "Options FollowSymLinks" to the Apache Configuration for the corresponding VirtualHost / DocumentRoot.

Re: error 403 for locahost

PostPosted: 21. July 2015 16:25
by duns
Thank you for your answer, buit i am quite handycap with the terminals. Cloud you kindly tell me exactly what code i have to write?
Thank you
Duns

Re: error 403 for locahost

PostPosted: 21. July 2015 17:26
by Nobbie
Open a terminal and enter the following commands

Code: Select all
sudo chmod 0777 /home


and

Code: Select all
sudo chmod 0777 /home/francesco


and

Code: Select all
sudo chmod 0777 /home/francesco/schede



You will be prompted for a pasword, enter your own password.

Re: error 403 for locahost [solved]

PostPosted: 21. July 2015 18:53
by duns
Solved!!! Thank you
Duns