You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@httpd.apache.org by James Godrej <ja...@yahoo.in> on 2011/02/04 16:08:15 UTC

[users@httpd] permissions problem on my webserver

I just installed lamp on Ubuntu 10.04.
So all files are default and when I check http://localhost
I see the index page of Ubuntu which says It works!!
So upto here the installation was very smooth.
Now comes the problem I download a lms known as ilias from web 
and put it in /var/www extract it so it is some thing now

/var/www/
/var/www/ilias/ 
/var/www/ilias/rest/of/the/files

permissions
root@james:/var/www# ls -l
total 4
drwxr-xr-x 15 www-data www-data 4096 2010-06-14 22:05 ilias

when I go to a browser then rather than seeing the index page what I see is the 
directory starts getting downloaded.(Now I see a permissions denied error)
"You don't have permission to access / on this server."

Following is my vhost 

<VirtualHost *:80>
        ServerAdmin webmaster@localhost
        DocumentRoot /var/www
        ErrorLog /var/log/apache2/error.log
        LogLevel warn
        CustomLog /var/log/apache2/access.log combined
</VirtualHost>

and following line I see in log 
192.168.43.1 - - [04/Feb/2011:20:31:08 +0530] "GET / HTTP/1.1" 403 261 "-" 
"Mozilla/5.0 (X11; U; Linux x86_64; en-US; rv:1.9.2.12) Gecko/20101027 
Ubuntu/10.04 (lucid) Firefox/3.6.12"

and in error.log 

[Fri Feb 04 20:30:23 2011] [error] [client 192.168.43.1] Directory index 
forbidden by Options directive: /var/www/
[Fri Feb 04 20:31:08 2011] [error] [client 192.168.43.1] Directory index 
forbidden by Options directive: /var/www/

What should I do in this situation?



---------------------------------------------------------------------
The official User-To-User support forum of the Apache HTTP Server Project.
See <URL:http://httpd.apache.org/userslist.html> for more info.
To unsubscribe, e-mail: users-unsubscribe@httpd.apache.org
   "   from the digest: users-digest-unsubscribe@httpd.apache.org
For additional commands, e-mail: users-help@httpd.apache.org


Fwd: [users@httpd] permissions problem on my webserver

Posted by Eric Covener <co...@gmail.com>.
> [Fri Feb 04 20:30:23 2011] [error] [client 192.168.43.1] Directory index
> forbidden by Options directive: /var/www/

Frequent FAQ.  How could this message be improved to help users
understand what's going on between Options and DirectoryIndex?

"Directory listing forbidden by Options directive and no default
directory index found via configured DirectoryIndex  (foo.php,
foo.html)"

(maybe mod_dir needs a way to let mod_autoindex know where he looked
in a note if we can't get the dirconfig?)

Re: [users@httpd] permissions problem on my webserver

Posted by James Godrej <ja...@yahoo.in>.



----- Original Message ----
From: James Godrej <ja...@yahoo.in>
To: users@httpd.apache.org; joost@sanguis.xs4all.nl
Sent: Fri, 4 February, 2011 10:06:20 PM
Subject: Re: [users@httpd] permissions problem on my webserver





----- Original Message ----
From: Joost de Heer <jo...@sanguis.xs4all.nl>
To: users@httpd.apache.org
Sent: Fri, 4 February, 2011 8:47:44 PM
Subject: Re: [users@httpd] permissions problem on my webserver

On Fri, February 4, 2011 16:08, James Godrej wrote:

> when I go to a browser then rather than seeing the index page what I see
> is the
> directory starts getting downloaded.(Now I see a permissions denied error)
> "You don't have permission to access / on this server."

> What should I do in this situation?

Add the proper DirectoryIndex
(http://httpd.apache.org/docs/2.2/mod/mod_dir.html#directoryindex).

Joost

---------------------------------------------------------------------
Yes this came to my mind also so I did the new vhost configuration as 
<VirtualHost *:80>
        ServerAdmin webmaster@localhost

        DocumentRoot /var/www
        <Directory /var/www>
        DirectoryIndex index.html index.php
        Options Indexes FollowSymLinks
        </Directory>

        ErrorLog /var/log/apache2/error.log

        # Possible values include: debug, info, notice, warn, error, crit,
        # alert, emerg.
        LogLevel warn

        CustomLog /var/log/apache2/access.log combined


</VirtualHost>
but this still did not helped.

I checked this link also
http://onlamp.com/pub/a/apache/2004/04/22/apacheckbk.html
I tried in vhost above 
Options +Indexes FollowSymLinks
but this also did not helped me much.
Any more suggestions?




---------------------------------------------------------------------
I further want some thing to this situation

Here is apache log when I access the site on machine where it actually is as 
http://localhost

127.0.0.1 - - [04/Feb/2011:22:18:29 +0530] "GET 
/ilias/templates/default/images/ButtonsBack.gif HTTP/1.1" 304 - 
"http://localhost/ilias/templates/default/delos.css" "Mozilla/5.0 (X11; U; Linux 
i686; en-US; rv:1.9.0.8) Gecko/2009033100 Ubuntu/9.04 (jaunty) Firefox/3.0.8"

but when I do http://192.168.43.129/ilias/

I do not see any entry in /var/log/apache2/access.log . The most surprising part 
of this problem is I have installed Ubuntu in a Vmware running on a Laptop. So 
no question of gateway etc.The IP of Guest Ubuntu is 192.168.43.129 and that of 
host Ubuntu is 192.168.1.3

Any more suggestions?



---------------------------------------------------------------------
The official User-To-User support forum of the Apache HTTP Server Project.
See <URL:http://httpd.apache.org/userslist.html> for more info.
To unsubscribe, e-mail: users-unsubscribe@httpd.apache.org
   "   from the digest: users-digest-unsubscribe@httpd.apache.org
For additional commands, e-mail: users-help@httpd.apache.org


Re: [users@httpd] permissions problem on my webserver

Posted by James Godrej <ja...@yahoo.in>.



----- Original Message ----
From: Joost de Heer <jo...@sanguis.xs4all.nl>
To: users@httpd.apache.org
Sent: Fri, 4 February, 2011 8:47:44 PM
Subject: Re: [users@httpd] permissions problem on my webserver

On Fri, February 4, 2011 16:08, James Godrej wrote:

> when I go to a browser then rather than seeing the index page what I see
> is the
> directory starts getting downloaded.(Now I see a permissions denied error)
> "You don't have permission to access / on this server."

> What should I do in this situation?

Add the proper DirectoryIndex
(http://httpd.apache.org/docs/2.2/mod/mod_dir.html#directoryindex).

Joost

---------------------------------------------------------------------
Yes this came to my mind also so I did the new vhost configuration as 
<VirtualHost *:80>
        ServerAdmin webmaster@localhost

        DocumentRoot /var/www
        <Directory /var/www>
        DirectoryIndex index.html index.php
        Options Indexes FollowSymLinks
        </Directory>

        ErrorLog /var/log/apache2/error.log

        # Possible values include: debug, info, notice, warn, error, crit,
        # alert, emerg.
        LogLevel warn

        CustomLog /var/log/apache2/access.log combined


</VirtualHost>
but this still did not helped.

I checked this link also
http://onlamp.com/pub/a/apache/2004/04/22/apacheckbk.html
I tried in vhost above 
Options +Indexes FollowSymLinks
but this also did not helped me much.
Any more suggestions?




---------------------------------------------------------------------
The official User-To-User support forum of the Apache HTTP Server Project.
See <URL:http://httpd.apache.org/userslist.html> for more info.
To unsubscribe, e-mail: users-unsubscribe@httpd.apache.org
   "   from the digest: users-digest-unsubscribe@httpd.apache.org
For additional commands, e-mail: users-help@httpd.apache.org


Re: [users@httpd] permissions problem on my webserver

Posted by Joost de Heer <jo...@sanguis.xs4all.nl>.
On Fri, February 4, 2011 16:08, James Godrej wrote:

> when I go to a browser then rather than seeing the index page what I see
> is the
> directory starts getting downloaded.(Now I see a permissions denied error)
> "You don't have permission to access / on this server."

> What should I do in this situation?

Add the proper DirectoryIndex
(http://httpd.apache.org/docs/2.2/mod/mod_dir.html#directoryindex).

Joost

---------------------------------------------------------------------
The official User-To-User support forum of the Apache HTTP Server Project.
See <URL:http://httpd.apache.org/userslist.html> for more info.
To unsubscribe, e-mail: users-unsubscribe@httpd.apache.org
   "   from the digest: users-digest-unsubscribe@httpd.apache.org
For additional commands, e-mail: users-help@httpd.apache.org


Re: [users@httpd] permissions problem on my webserver

Posted by James Godrej <ja...@yahoo.in>.



----- Original Message ----
From: Sander Temme <sc...@apache.org>
To: users@httpd.apache.org
Sent: Fri, 4 February, 2011 11:01:56 PM
Subject: Re: [users@httpd] permissions problem on my webserver


On Feb 4, 2011, at 7:08 AM, James Godrej wrote:

> when I go to a browser then rather than seeing the index page what I see is the 
>
> directory starts getting downloaded.(Now I see a permissions denied error)
> "You don't have permission to access / on this server."

You must have removed that index.html, and the resultant overlay of the Options 
statements in your config is that Indexes are forbidden. 


Note that the default vhost on Ubuntu has a <Directory "/" > block, and the main 
server config doesn't.  


I have never heard of Ilias, but you'll find that http://localhost/ilias/ will 
give you better results.  


S. 

> 
> Following is my vhost 
> 
> <VirtualHost *:80>
>        ServerAdmin webmaster@localhost
>        DocumentRoot /var/www
>        ErrorLog /var/log/apache2/error.log
>        LogLevel warn
>        CustomLog /var/log/apache2/access.log combined
> </VirtualHost>

You don't specify Options Indexes for <Directory "/var/www">, so you're working 
with whatever the server default is.  


> and following line I see in log 
> 192.168.43.1 - - [04/Feb/2011:20:31:08 +0530] "GET / HTTP/1.1" 403 261 "-" 
> "Mozilla/5.0 (X11; U; Linux x86_64; en-US; rv:1.9.2.12) Gecko/20101027 
> Ubuntu/10.04 (lucid) Firefox/3.6.12"
> 
> and in error.log 
> 
> [Fri Feb 04 20:30:23 2011] [error] [client 192.168.43.1] Directory index 
> forbidden by Options directive: /var/www/
> [Fri Feb 04 20:31:08 2011] [error] [client 192.168.43.1] Directory index 
> forbidden by Options directive: /var/www/

Options, or lack thereof which means you're working with whatever is the server 
default.

> What should I do in this situation?

What are you trying to achieve?  The path to the Ilias installation is under the 
subdirectory, can you get there?  Would you rather have that in the root dir? 


If you want to show content in the root dir, put content in there (you must have 
removed the default index.html).  If you want to have Ilias in the root dir, 
unzip it there or make the ilias directory your root.

S.

-- 
Hi Sander thanks for your message I reached there you are correct.
The correct configuration should be as follows

<VirtualHost *:80>
        ServerAdmin webmaster@localhost
        ServerName localhost
        DocumentRoot /var/www
     <Directory />
                Options FollowSymLinks
                AllowOverride None
        </Directory>
        <Directory /var/www/>
                Options Indexes FollowSymLinks MultiViews
                AllowOverride All
                Order allow,deny
                allow from all
        </Directory>

        <Directory /var/www/>
        Options Indexes FollowSymLinks MultiViews
                AllowOverride None
                Order allow,deny
                allow from all

        </Directory>

        ErrorLog /var/log/apache2/error.log

        # Possible values include: debug, info, notice, warn, error, crit,
        # alert, emerg.
        LogLevel warn

        CustomLog /var/log/apache2/access.log combined


</VirtualHost>

but do let me know why did this configuration work I copied it from an existing 
working configuration.




---------------------------------------------------------------------
The official User-To-User support forum of the Apache HTTP Server Project.
See <URL:http://httpd.apache.org/userslist.html> for more info.
To unsubscribe, e-mail: users-unsubscribe@httpd.apache.org
   "   from the digest: users-digest-unsubscribe@httpd.apache.org
For additional commands, e-mail: users-help@httpd.apache.org


Re: [users@httpd] permissions problem on my webserver

Posted by James Godrej <ja...@yahoo.in>.



----- Original Message ----
From: Sander Temme <sc...@apache.org>
To: users@httpd.apache.org
Sent: Fri, 4 February, 2011 11:01:56 PM
Subject: Re: [users@httpd] permissions problem on my webserver


On Feb 4, 2011, at 7:08 AM, James Godrej wrote:

> when I go to a browser then rather than seeing the index page what I see is the 
>
> directory starts getting downloaded.(Now I see a permissions denied error)
> "You don't have permission to access / on this server."

You must have removed that index.html, and the resultant overlay of the Options 
statements in your config is that Indexes are forbidden. 


Note that the default vhost on Ubuntu has a <Directory "/" > block, and the main 
server config doesn't.  


I have never heard of Ilias, but you'll find that http://localhost/ilias/ will 
give you better results.  


S. 

> 
> Following is my vhost 
> 
> <VirtualHost *:80>
>        ServerAdmin webmaster@localhost
>        DocumentRoot /var/www
>        ErrorLog /var/log/apache2/error.log
>        LogLevel warn
>        CustomLog /var/log/apache2/access.log combined
> </VirtualHost>

You don't specify Options Indexes for <Directory "/var/www">, so you're working 
with whatever the server default is.  


> and following line I see in log 
> 192.168.43.1 - - [04/Feb/2011:20:31:08 +0530] "GET / HTTP/1.1" 403 261 "-" 
> "Mozilla/5.0 (X11; U; Linux x86_64; en-US; rv:1.9.2.12) Gecko/20101027 
> Ubuntu/10.04 (lucid) Firefox/3.6.12"
> 
> and in error.log 
> 
> [Fri Feb 04 20:30:23 2011] [error] [client 192.168.43.1] Directory index 
> forbidden by Options directive: /var/www/
> [Fri Feb 04 20:31:08 2011] [error] [client 192.168.43.1] Directory index 
> forbidden by Options directive: /var/www/

Options, or lack thereof which means you're working with whatever is the server 
default.

> What should I do in this situation?

What are you trying to achieve?  The path to the Ilias installation is under the 
subdirectory, can you get there?  Would you rather have that in the root dir? 


If you want to show content in the root dir, put content in there (you must have 
removed the default index.html).  If you want to have Ilias in the root dir, 
unzip it there or make the ilias directory your root.

S.

-- 
Sander Temme
sctemme@apache.org
PGP FP: FC5A 6FC6 2E25 2DFD 8007  EE23 9BB8 63B0 F51B B88A

View my availability: http://tungle.me/sctemme




---------------------------------------------------------------------
I do not agree to what you said.I have 9 more Content management system in 
similar configuration.I created directories for each of them 

in /var/www
and I did not had to do any thing special to reach them.
I am trying this experiment on my local machine and once this works I have to 
deploy it to a production machine.
Which has all those 9 lmses running.




---------------------------------------------------------------------
The official User-To-User support forum of the Apache HTTP Server Project.
See <URL:http://httpd.apache.org/userslist.html> for more info.
To unsubscribe, e-mail: users-unsubscribe@httpd.apache.org
   "   from the digest: users-digest-unsubscribe@httpd.apache.org
For additional commands, e-mail: users-help@httpd.apache.org


Re: [users@httpd] permissions problem on my webserver

Posted by Sander Temme <sc...@apache.org>.
On Feb 4, 2011, at 7:08 AM, James Godrej wrote:

> when I go to a browser then rather than seeing the index page what I see is the 
> directory starts getting downloaded.(Now I see a permissions denied error)
> "You don't have permission to access / on this server."

You must have removed that index.html, and the resultant overlay of the Options statements in your config is that Indexes are forbidden. 

Note that the default vhost on Ubuntu has a <Directory "/" > block, and the main server config doesn't.  

I have never heard of Ilias, but you'll find that http://localhost/ilias/ will give you better results.  

S. 

> 
> Following is my vhost 
> 
> <VirtualHost *:80>
>        ServerAdmin webmaster@localhost
>        DocumentRoot /var/www
>        ErrorLog /var/log/apache2/error.log
>        LogLevel warn
>        CustomLog /var/log/apache2/access.log combined
> </VirtualHost>

You don't specify Options Indexes for <Directory "/var/www">, so you're working with whatever the server default is.  

> and following line I see in log 
> 192.168.43.1 - - [04/Feb/2011:20:31:08 +0530] "GET / HTTP/1.1" 403 261 "-" 
> "Mozilla/5.0 (X11; U; Linux x86_64; en-US; rv:1.9.2.12) Gecko/20101027 
> Ubuntu/10.04 (lucid) Firefox/3.6.12"
> 
> and in error.log 
> 
> [Fri Feb 04 20:30:23 2011] [error] [client 192.168.43.1] Directory index 
> forbidden by Options directive: /var/www/
> [Fri Feb 04 20:31:08 2011] [error] [client 192.168.43.1] Directory index 
> forbidden by Options directive: /var/www/

Options, or lack thereof which means you're working with whatever is the server default.

> What should I do in this situation?

What are you trying to achieve?  The path to the Ilias installation is under the subdirectory, can you get there?  Would you rather have that in the root dir? 

If you want to show content in the root dir, put content in there (you must have removed the default index.html).  If you want to have Ilias in the root dir, unzip it there or make the ilias directory your root.

S.

-- 
Sander Temme
sctemme@apache.org
PGP FP: FC5A 6FC6 2E25 2DFD 8007  EE23 9BB8 63B0 F51B B88A

View my availability: http://tungle.me/sctemme




---------------------------------------------------------------------
The official User-To-User support forum of the Apache HTTP Server Project.
See <URL:http://httpd.apache.org/userslist.html> for more info.
To unsubscribe, e-mail: users-unsubscribe@httpd.apache.org
   "   from the digest: users-digest-unsubscribe@httpd.apache.org
For additional commands, e-mail: users-help@httpd.apache.org


Re: [users@httpd] permissions problem on my webserver

Posted by Igor Galić <i....@brainsware.org>.
----- "James Godrej" <ja...@yahoo.in> wrote:

> I just installed lamp on Ubuntu 10.04.
> So all files are default and when I check http://localhost
> I see the index page of Ubuntu which says It works!!
> So upto here the installation was very smooth.
> Now comes the problem I download a lms known as ilias from web
> and put it in /var/www extract it so it is some thing now
> 
> /var/www/
> /var/www/ilias/
> /var/www/ilias/rest/of/the/files
> 
> permissions
> root@james:/var/www# ls -l
> total 4
> drwxr-xr-x 15 www-data www-data 4096 2010-06-14 22:05 ilias
> 
> when I go to a browser then rather than seeing the index page what I
> see is the
> directory starts getting downloaded.(Now I see a permissions denied
> error)
> "You don't have permission to access / on this server."
> 
> Following is my vhost
> 
> <VirtualHost *:80>
>         ServerAdmin webmaster@localhost
>         DocumentRoot /var/www
>         ErrorLog /var/log/apache2/error.log
>         LogLevel warn
>         CustomLog /var/log/apache2/access.log combined
> </VirtualHost>
> 
> and following line I see in log
> 192.168.43.1 - - [04/Feb/2011:20:31:08 +0530] "GET / HTTP/1.1" 403 261
> "-"
> "Mozilla/5.0 (X11; U; Linux x86_64; en-US; rv:1.9.2.12) Gecko/20101027
> Ubuntu/10.04 (lucid) Firefox/3.6.12"
> 
> and in error.log
> 
> [Fri Feb 04 20:30:23 2011] [error] [client 192.168.43.1] Directory
> index
> forbidden by Options directive: /var/www/
> [Fri Feb 04 20:31:08 2011] [error] [client 192.168.43.1] Directory
> index
> forbidden by Options directive: /var/www/
> 
> What should I do in this situation?

See:
http://onlamp.com/pub/a/apache/2004/04/22/apacheckbk.html

For all cases that cause a "forbidden" error in the frontend.

i

-- 
Igor Galić

Tel: +43 (0) 664 886 22 883
Mail: i.galic@brainsware.org
URL: http://brainsware.org/

---------------------------------------------------------------------
The official User-To-User support forum of the Apache HTTP Server Project.
See <URL:http://httpd.apache.org/userslist.html> for more info.
To unsubscribe, e-mail: users-unsubscribe@httpd.apache.org
   "   from the digest: users-digest-unsubscribe@httpd.apache.org
For additional commands, e-mail: users-help@httpd.apache.org