403 Forbidden

classic Classic list List threaded Threaded
8 messages Options
Reply | Threaded
Open this post in threaded view
|

403 Forbidden

Matthew Johnson
Hello everyone,

I have successfully installed GBrowse2 and its prerequisites on Mac OSX Mavericks.  I’m not all that familiar with Apache.  Here’s the problem:

I used to be able to see http://localhost/gbrowse2 but now I get 403 Forbidden, You don’t have permission to access /gbrowse2/index.html on this server.  

That however is progress because yesterday I wasn’t able to see http://localhost with the same error message.  So I added:
<VirtualHost *:80>
ServerName localhost
DocumentRoot /Library/WebServer/Documents/
</VirtualHost>
to my virtual host conf file located in /etc/apache2/extra/httpd-vhosts.conf. I followed those instructions from: http://coolestguidesontheplanet.com/set-virtual-hosts-apache-mac-osx-10-9-mavericks-osx-10-8-mountain-lion/
so now when I visit http://localhost I get the “It Works!” string.

Here are the last five lines of my apache2 error log

[Thu Mar 20 11:08:14 2014] [error] [client 127.0.0.1] (13)Permission denied: file permissions deny server access: /Library/WebServer/Documents/gbrowse2/index.html
[Thu Mar 20 11:08:31 2014] [error] [client 127.0.0.1] (13)Permission denied: file permissions deny server access: /Library/WebServer/Documents/gbrowse2/index.html
[Thu Mar 20 11:08:32 2014] [error] [client 127.0.0.1] (13)Permission denied: file permissions deny server access: /Library/WebServer/Documents/gbrowse2/index.html
[Thu Mar 20 11:08:34 2014] [error] [client 127.0.0.1] (13)Permission denied: file permissions deny server access: /Library/WebServer/Documents/gbrowse2/index.html
[Thu Mar 20 11:09:58 2014] [error] [client 127.0.0.1] (13)Permission denied: file permissions deny server access: /Library/WebServer/Documents/gbrowse2/index.html

Thanks in advance and I look forward to the responses.
Matt



------------------------------------------------------------------------------
Learn Graph Databases - Download FREE O'Reilly Book
"Graph Databases" is the definitive new guide to graph databases and their
applications. Written by three acclaimed leaders in the field,
this first edition is now available. Download your free book today!
http://p.sf.net/sfu/13534_NeoTech
_______________________________________________
Gmod-gbrowse mailing list
[hidden email]
https://lists.sourceforge.net/lists/listinfo/gmod-gbrowse
Reply | Threaded
Open this post in threaded view
|

Re: 403 Forbidden

Scott Cain
Hi Matt,

So what are the file permissions on index.html in /Library/WebServer/Documents/gbrowse2?  You could show us the output of `ls -l /Library/WebServer/Documents/gbrowse2/index.html` if you want.

It wouldn't surprise me if Apple put some strange restrictions on apache that I'm not aware of though.  I've been using Macs for several years but gave up on them as a test server because they are somewhat odd when it comes to standards.

Scott


On Thu, Mar 20, 2014 at 12:25 PM, Matthew Johnson <[hidden email]> wrote:
Hello everyone,

I have successfully installed GBrowse2 and its prerequisites on Mac OSX Mavericks.  I’m not all that familiar with Apache.  Here’s the problem:

I used to be able to see http://localhost/gbrowse2 but now I get 403 Forbidden, You don’t have permission to access /gbrowse2/index.html on this server.  

That however is progress because yesterday I wasn’t able to see http://localhost with the same error message.  So I added:
<VirtualHost *:80>
ServerName localhost
DocumentRoot /Library/WebServer/Documents/
</VirtualHost>
to my virtual host conf file located in /etc/apache2/extra/httpd-vhosts.conf. I followed those instructions from: http://coolestguidesontheplanet.com/set-virtual-hosts-apache-mac-osx-10-9-mavericks-osx-10-8-mountain-lion/
so now when I visit http://localhost I get the “It Works!” string.

Here are the last five lines of my apache2 error log

[Thu Mar 20 11:08:14 2014] [error] [client 127.0.0.1] (13)Permission denied: file permissions deny server access: /Library/WebServer/Documents/gbrowse2/index.html
[Thu Mar 20 11:08:31 2014] [error] [client 127.0.0.1] (13)Permission denied: file permissions deny server access: /Library/WebServer/Documents/gbrowse2/index.html
[Thu Mar 20 11:08:32 2014] [error] [client 127.0.0.1] (13)Permission denied: file permissions deny server access: /Library/WebServer/Documents/gbrowse2/index.html
[Thu Mar 20 11:08:34 2014] [error] [client 127.0.0.1] (13)Permission denied: file permissions deny server access: /Library/WebServer/Documents/gbrowse2/index.html
[Thu Mar 20 11:09:58 2014] [error] [client 127.0.0.1] (13)Permission denied: file permissions deny server access: /Library/WebServer/Documents/gbrowse2/index.html

Thanks in advance and I look forward to the responses.
Matt



------------------------------------------------------------------------------
Learn Graph Databases - Download FREE O'Reilly Book
"Graph Databases" is the definitive new guide to graph databases and their
applications. Written by three acclaimed leaders in the field,
this first edition is now available. Download your free book today!
http://p.sf.net/sfu/13534_NeoTech
_______________________________________________
Gmod-gbrowse mailing list
[hidden email]
https://lists.sourceforge.net/lists/listinfo/gmod-gbrowse




--
------------------------------------------------------------------------
Scott Cain, Ph. D.                                   scott at scottcain dot net
GMOD Coordinator (http://gmod.org/)                     216-392-3087
Ontario Institute for Cancer Research

------------------------------------------------------------------------------
Learn Graph Databases - Download FREE O'Reilly Book
"Graph Databases" is the definitive new guide to graph databases and their
applications. Written by three acclaimed leaders in the field,
this first edition is now available. Download your free book today!
http://p.sf.net/sfu/13534_NeoTech
_______________________________________________
Gmod-gbrowse mailing list
[hidden email]
https://lists.sourceforge.net/lists/listinfo/gmod-gbrowse
Reply | Threaded
Open this post in threaded view
|

Re: 403 Forbidden

Matthew Johnson
Hi Scott,

Thanks for your reply.  

"ls -l /Library/WebServer/Documents/gbrowse2/index.html" yielded the following:
-rwxr-s---  1 root  wheel  3968 Mar  6 20:29 /Library/WebServer/Documents/gbrowse2/index.html

Matt


On Mar 20, 2014, at 12:25 PM, Scott Cain <[hidden email]> wrote:

Hi Matt,

So what are the file permissions on index.html in /Library/WebServer/Documents/gbrowse2?  You could show us the output of `ls -l /Library/WebServer/Documents/gbrowse2/index.html` if you want.

It wouldn't surprise me if Apple put some strange restrictions on apache that I'm not aware of though.  I've been using Macs for several years but gave up on them as a test server because they are somewhat odd when it comes to standards.

Scott


On Thu, Mar 20, 2014 at 12:25 PM, Matthew Johnson <[hidden email]> wrote:
Hello everyone,

I have successfully installed GBrowse2 and its prerequisites on Mac OSX Mavericks.  I’m not all that familiar with Apache.  Here’s the problem:

I used to be able to see http://localhost/gbrowse2 but now I get 403 Forbidden, You don’t have permission to access /gbrowse2/index.html on this server.  

That however is progress because yesterday I wasn’t able to see http://localhost with the same error message.  So I added:
<VirtualHost *:80>
ServerName localhost
DocumentRoot /Library/WebServer/Documents/
</VirtualHost>
to my virtual host conf file located in /etc/apache2/extra/httpd-vhosts.conf. I followed those instructions from: http://coolestguidesontheplanet.com/set-virtual-hosts-apache-mac-osx-10-9-mavericks-osx-10-8-mountain-lion/
so now when I visit http://localhost I get the “It Works!” string.

Here are the last five lines of my apache2 error log

[Thu Mar 20 11:08:14 2014] [error] [client 127.0.0.1] (13)Permission denied: file permissions deny server access: /Library/WebServer/Documents/gbrowse2/index.html
[Thu Mar 20 11:08:31 2014] [error] [client 127.0.0.1] (13)Permission denied: file permissions deny server access: /Library/WebServer/Documents/gbrowse2/index.html
[Thu Mar 20 11:08:32 2014] [error] [client 127.0.0.1] (13)Permission denied: file permissions deny server access: /Library/WebServer/Documents/gbrowse2/index.html
[Thu Mar 20 11:08:34 2014] [error] [client 127.0.0.1] (13)Permission denied: file permissions deny server access: /Library/WebServer/Documents/gbrowse2/index.html
[Thu Mar 20 11:09:58 2014] [error] [client 127.0.0.1] (13)Permission denied: file permissions deny server access: /Library/WebServer/Documents/gbrowse2/index.html

Thanks in advance and I look forward to the responses.
Matt



------------------------------------------------------------------------------
Learn Graph Databases - Download FREE O'Reilly Book
"Graph Databases" is the definitive new guide to graph databases and their
applications. Written by three acclaimed leaders in the field,
this first edition is now available. Download your free book today!
http://p.sf.net/sfu/13534_NeoTech
_______________________________________________
Gmod-gbrowse mailing list
[hidden email]
https://lists.sourceforge.net/lists/listinfo/gmod-gbrowse




--
------------------------------------------------------------------------
Scott Cain, Ph. D.                                   scott at scottcain dot net
GMOD Coordinator (http://gmod.org/)                     216-392-3087
Ontario Institute for Cancer Research


------------------------------------------------------------------------------
Learn Graph Databases - Download FREE O'Reilly Book
"Graph Databases" is the definitive new guide to graph databases and their
applications. Written by three acclaimed leaders in the field,
this first edition is now available. Download your free book today!
http://p.sf.net/sfu/13534_NeoTech
_______________________________________________
Gmod-gbrowse mailing list
[hidden email]
https://lists.sourceforge.net/lists/listinfo/gmod-gbrowse
Reply | Threaded
Open this post in threaded view
|

Re: 403 Forbidden

Scott Cain
Hi Matt,

Odd, I'm not sure why the set-UID would be set for index.html since it's not an executable file, but the root of the problem is that the file isn't world readable or owned by the webserver owner (whose name I don't recall off hand).  The easiest way to fix this is to change the permissions on the file:

  sudo chmod a+r /Library/WebServer/Documents/gbrowse2/index.html

Given that you have this problem for the index file, you probably will have permissions problems with other files as well.

Scott



On Thu, Mar 20, 2014 at 1:45 PM, Matthew Johnson <[hidden email]> wrote:
Hi Scott,

Thanks for your reply.  

"ls -l /Library/WebServer/Documents/gbrowse2/index.html" yielded the following:
-rwxr-s---  1 root  wheel  3968 Mar  6 20:29 /Library/WebServer/Documents/gbrowse2/index.html

Matt


On Mar 20, 2014, at 12:25 PM, Scott Cain <[hidden email]> wrote:

Hi Matt,

So what are the file permissions on index.html in /Library/WebServer/Documents/gbrowse2?  You could show us the output of `ls -l /Library/WebServer/Documents/gbrowse2/index.html` if you want.

It wouldn't surprise me if Apple put some strange restrictions on apache that I'm not aware of though.  I've been using Macs for several years but gave up on them as a test server because they are somewhat odd when it comes to standards.

Scott


On Thu, Mar 20, 2014 at 12:25 PM, Matthew Johnson <[hidden email]> wrote:
Hello everyone,

I have successfully installed GBrowse2 and its prerequisites on Mac OSX Mavericks.  I’m not all that familiar with Apache.  Here’s the problem:

I used to be able to see http://localhost/gbrowse2 but now I get 403 Forbidden, You don’t have permission to access /gbrowse2/index.html on this server.  

That however is progress because yesterday I wasn’t able to see http://localhost with the same error message.  So I added:
<VirtualHost *:80>
ServerName localhost
DocumentRoot /Library/WebServer/Documents/
</VirtualHost>
to my virtual host conf file located in /etc/apache2/extra/httpd-vhosts.conf. I followed those instructions from: http://coolestguidesontheplanet.com/set-virtual-hosts-apache-mac-osx-10-9-mavericks-osx-10-8-mountain-lion/
so now when I visit http://localhost I get the “It Works!” string.

Here are the last five lines of my apache2 error log

[Thu Mar 20 11:08:14 2014] [error] [client 127.0.0.1] (13)Permission denied: file permissions deny server access: /Library/WebServer/Documents/gbrowse2/index.html
[Thu Mar 20 11:08:31 2014] [error] [client 127.0.0.1] (13)Permission denied: file permissions deny server access: /Library/WebServer/Documents/gbrowse2/index.html
[Thu Mar 20 11:08:32 2014] [error] [client 127.0.0.1] (13)Permission denied: file permissions deny server access: /Library/WebServer/Documents/gbrowse2/index.html
[Thu Mar 20 11:08:34 2014] [error] [client 127.0.0.1] (13)Permission denied: file permissions deny server access: /Library/WebServer/Documents/gbrowse2/index.html
[Thu Mar 20 11:09:58 2014] [error] [client 127.0.0.1] (13)Permission denied: file permissions deny server access: /Library/WebServer/Documents/gbrowse2/index.html

Thanks in advance and I look forward to the responses.
Matt



------------------------------------------------------------------------------
Learn Graph Databases - Download FREE O'Reilly Book
"Graph Databases" is the definitive new guide to graph databases and their
applications. Written by three acclaimed leaders in the field,
this first edition is now available. Download your free book today!
http://p.sf.net/sfu/13534_NeoTech
_______________________________________________
Gmod-gbrowse mailing list
[hidden email]
https://lists.sourceforge.net/lists/listinfo/gmod-gbrowse




--
------------------------------------------------------------------------
Scott Cain, Ph. D.                                   scott at scottcain dot net
GMOD Coordinator (http://gmod.org/)                     <a href="tel:216-392-3087" value="+12163923087" target="_blank">216-392-3087
Ontario Institute for Cancer Research




--
------------------------------------------------------------------------
Scott Cain, Ph. D.                                   scott at scottcain dot net
GMOD Coordinator (http://gmod.org/)                     216-392-3087
Ontario Institute for Cancer Research

------------------------------------------------------------------------------
Learn Graph Databases - Download FREE O'Reilly Book
"Graph Databases" is the definitive new guide to graph databases and their
applications. Written by three acclaimed leaders in the field,
this first edition is now available. Download your free book today!
http://p.sf.net/sfu/13534_NeoTech
_______________________________________________
Gmod-gbrowse mailing list
[hidden email]
https://lists.sourceforge.net/lists/listinfo/gmod-gbrowse
Reply | Threaded
Open this post in threaded view
|

Re: 403 Forbidden

Timothy Parnell
Hi,

The apache user on OS X is _www, group is also _www. Another fine example of Think Different. Still, once you know these things and can account for them, you can easily run GBrowse on a Mac. It’s fine for individual or lab settings, but I would stick to linux for larger productions.

I’ve never had to enable virtual hosts on OS X, and it seems to work ok. The problems I’ve encountered is fixing ownerships for some of the /var/lib and /var/tmp locations. And then adding extra permissions to /etc/apache2/other/gbrowse2.conf like so

  <Directory "/Library/Webserver/CGI-Executables/gb2">
   Options ExecCGI
   SetEnv GBROWSE_CONF   "/etc/gbrowse2"
   # extra permissions
   Order allow,deny
   Allow from all
  </Directory>

I have some of my own notes for GBrowse and OS X  written up here
http://code.google.com/p/biotoolbox/wiki/SetupForMacOSX#Installing_GBrowse

Hope that helps.
Tim


On Mar 20, 2014, at 12:02 PM, Scott Cain <[hidden email]<mailto:[hidden email]>> wrote:

Hi Matt,

Odd, I'm not sure why the set-UID would be set for index.html since it's not an executable file, but the root of the problem is that the file isn't world readable or owned by the webserver owner (whose name I don't recall off hand).  The easiest way to fix this is to change the permissions on the file:

  sudo chmod a+r /Library/WebServer/Documents/gbrowse2/index.html

Given that you have this problem for the index file, you probably will have permissions problems with other files as well.

Scott



On Thu, Mar 20, 2014 at 1:45 PM, Matthew Johnson <[hidden email]<mailto:[hidden email]>> wrote:
Hi Scott,

Thanks for your reply.

"ls -l /Library/WebServer/Documents/gbrowse2/index.html" yielded the following:
-rwxr-s---  1 root  wheel  3968 Mar  6 20:29 /Library/WebServer/Documents/gbrowse2/index.html

Matt


On Mar 20, 2014, at 12:25 PM, Scott Cain <[hidden email]<mailto:[hidden email]>> wrote:

Hi Matt,

So what are the file permissions on index.html in /Library/WebServer/Documents/gbrowse2?  You could show us the output of `ls -l /Library/WebServer/Documents/gbrowse2/index.html` if you want.

It wouldn't surprise me if Apple put some strange restrictions on apache that I'm not aware of though.  I've been using Macs for several years but gave up on them as a test server because they are somewhat odd when it comes to standards.

Scott


On Thu, Mar 20, 2014 at 12:25 PM, Matthew Johnson <[hidden email]<mailto:[hidden email]>> wrote:
Hello everyone,

I have successfully installed GBrowse2 and its prerequisites on Mac OSX Mavericks.  I’m not all that familiar with Apache.  Here’s the problem:

I used to be able to see http://localhost/gbrowse2 but now I get 403 Forbidden, You don’t have permission to access /gbrowse2/index.html on this server.

That however is progress because yesterday I wasn’t able to see http://localhost<http://localhost/> with the same error message.  So I added:

<VirtualHost *:80>
ServerName localhost
DocumentRoot /Library/WebServer/Documents/
</VirtualHost>

to my virtual host conf file located in /etc/apache2/extra/httpd-vhosts.conf. I followed those instructions from: http://coolestguidesontheplanet.com/set-virtual-hosts-apache-mac-osx-10-9-mavericks-osx-10-8-mountain-lion/
so now when I visit http://localhost<http://localhost/> I get the “It Works!” string.

Here are the last five lines of my apache2 error log

[Thu Mar 20 11:08:14 2014] [error] [client 127.0.0.1] (13)Permission denied: file permissions deny server access: /Library/WebServer/Documents/gbrowse2/index.html
[Thu Mar 20 11:08:31 2014] [error] [client 127.0.0.1] (13)Permission denied: file permissions deny server access: /Library/WebServer/Documents/gbrowse2/index.html
[Thu Mar 20 11:08:32 2014] [error] [client 127.0.0.1] (13)Permission denied: file permissions deny server access: /Library/WebServer/Documents/gbrowse2/index.html
[Thu Mar 20 11:08:34 2014] [error] [client 127.0.0.1] (13)Permission denied: file permissions deny server access: /Library/WebServer/Documents/gbrowse2/index.html
[Thu Mar 20 11:09:58 2014] [error] [client 127.0.0.1] (13)Permission denied: file permissions deny server access: /Library/WebServer/Documents/gbrowse2/index.html

Thanks in advance and I look forward to the responses.
Matt



------------------------------------------------------------------------------
Learn Graph Databases - Download FREE O'Reilly Book
"Graph Databases" is the definitive new guide to graph databases and their
applications. Written by three acclaimed leaders in the field,
this first edition is now available. Download your free book today!
http://p.sf.net/sfu/13534_NeoTech
_______________________________________________
Gmod-gbrowse mailing list
[hidden email]<mailto:[hidden email]>
https://lists.sourceforge.net/lists/listinfo/gmod-gbrowse




--
------------------------------------------------------------------------
Scott Cain, Ph. D.                                   scott at scottcain dot net
GMOD Coordinator (http://gmod.org/)                     216-392-3087<tel:216-392-3087>
Ontario Institute for Cancer Research




--
------------------------------------------------------------------------
Scott Cain, Ph. D.                                   scott at scottcain dot net
GMOD Coordinator (http://gmod.org/)                     216-392-3087
Ontario Institute for Cancer Research
------------------------------------------------------------------------------
Learn Graph Databases - Download FREE O'Reilly Book
"Graph Databases" is the definitive new guide to graph databases and their
applications. Written by three acclaimed leaders in the field,
this first edition is now available. Download your free book today!
http://p.sf.net/sfu/13534_NeoTech_______________________________________________
Gmod-gbrowse mailing list
[hidden email]
https://lists.sourceforge.net/lists/listinfo/gmod-gbrowse


------------------------------------------------------------------------------
Learn Graph Databases - Download FREE O'Reilly Book
"Graph Databases" is the definitive new guide to graph databases and their
applications. Written by three acclaimed leaders in the field,
this first edition is now available. Download your free book today!
http://p.sf.net/sfu/13534_NeoTech
_______________________________________________
Gmod-gbrowse mailing list
[hidden email]
https://lists.sourceforge.net/lists/listinfo/gmod-gbrowse
Reply | Threaded
Open this post in threaded view
|

Re: 403 Forbidden

Matthew Johnson
Hi guys,

I fixed up the permission issues using chmod a+r command, I can now navigate to index.html and the links on that page without 403 forbidden.  Thanks for the help.  Although, when I click on the example databases (http://localhost/cgi-bin/gb2/gbrowse/yeast) I get the following:

500 internal service error

The server encountered an internal error or misconfiguration and was unable to complete your request.

Please contact the server administrator, [hidden email] and inform them of the time the error occurred, and anything you might have done that may have caused the error.

More information about this error may be available in the server error log.

So I check the error log and get the following:
[Fri Mar 21 07:42:29 2014] [error] [client 127.0.0.1] mkdir /var/tmp/gbrowse2/locks/1d: Permission denied at /Library/Perl/5.16/darwin-thread-multi-2level/Bio/Graphics/Browser2/Session.pm line 172.
[Fri Mar 21 07:42:29 2014] [error] [client 127.0.0.1] Premature end of script headers: gbrowse

@Tim Those notes were a life saver in my initial install.  I preferred those over the gbrowse wiki instructions.

Thanks again for all the help guys.
Matt


On Mar 20, 2014, at 1:33 PM, Timothy Parnell <[hidden email]> wrote:

Hi,

The apache user on OS X is _www, group is also _www. Another fine example of Think Different. Still, once you know these things and can account for them, you can easily run GBrowse on a Mac. It’s fine for individual or lab settings, but I would stick to linux for larger productions.

I’ve never had to enable virtual hosts on OS X, and it seems to work ok. The problems I’ve encountered is fixing ownerships for some of the /var/lib and /var/tmp locations. And then adding extra permissions to /etc/apache2/other/gbrowse2.conf like so

 <Directory "/Library/Webserver/CGI-Executables/gb2">
  Options ExecCGI
  SetEnv GBROWSE_CONF   "/etc/gbrowse2"
  # extra permissions
  Order allow,deny
  Allow from all
 </Directory>

I have some of my own notes for GBrowse and OS X  written up here
http://code.google.com/p/biotoolbox/wiki/SetupForMacOSX#Installing_GBrowse

Hope that helps.
Tim


On Mar 20, 2014, at 12:02 PM, Scott Cain <[hidden email]<mailto:[hidden email]>> wrote:

Hi Matt,

Odd, I'm not sure why the set-UID would be set for index.html since it's not an executable file, but the root of the problem is that the file isn't world readable or owned by the webserver owner (whose name I don't recall off hand).  The easiest way to fix this is to change the permissions on the file:

 sudo chmod a+r /Library/WebServer/Documents/gbrowse2/index.html

Given that you have this problem for the index file, you probably will have permissions problems with other files as well.

Scott



On Thu, Mar 20, 2014 at 1:45 PM, Matthew Johnson <[hidden email]<mailto:[hidden email]>> wrote:
Hi Scott,

Thanks for your reply.

"ls -l /Library/WebServer/Documents/gbrowse2/index.html" yielded the following:
-rwxr-s---  1 root  wheel  3968 Mar  6 20:29 /Library/WebServer/Documents/gbrowse2/index.html

Matt


On Mar 20, 2014, at 12:25 PM, Scott Cain <[hidden email]<mailto:[hidden email]>> wrote:

Hi Matt,

So what are the file permissions on index.html in /Library/WebServer/Documents/gbrowse2?  You could show us the output of `ls -l /Library/WebServer/Documents/gbrowse2/index.html` if you want.

It wouldn't surprise me if Apple put some strange restrictions on apache that I'm not aware of though.  I've been using Macs for several years but gave up on them as a test server because they are somewhat odd when it comes to standards.

Scott


On Thu, Mar 20, 2014 at 12:25 PM, Matthew Johnson <[hidden email]<mailto:[hidden email]>> wrote:
Hello everyone,

I have successfully installed GBrowse2 and its prerequisites on Mac OSX Mavericks.  I’m not all that familiar with Apache.  Here’s the problem:

I used to be able to see http://localhost/gbrowse2 but now I get 403 Forbidden, You don’t have permission to access /gbrowse2/index.html on this server.

That however is progress because yesterday I wasn’t able to see http://localhost<http://localhost/> with the same error message.  So I added:

<VirtualHost *:80>
ServerName localhost
DocumentRoot /Library/WebServer/Documents/
</VirtualHost>

to my virtual host conf file located in /etc/apache2/extra/httpd-vhosts.conf. I followed those instructions from: http://coolestguidesontheplanet.com/set-virtual-hosts-apache-mac-osx-10-9-mavericks-osx-10-8-mountain-lion/
so now when I visit http://localhost<http://localhost/> I get the “It Works!” string.

Here are the last five lines of my apache2 error log

[Thu Mar 20 11:08:14 2014] [error] [client 127.0.0.1] (13)Permission denied: file permissions deny server access: /Library/WebServer/Documents/gbrowse2/index.html
[Thu Mar 20 11:08:31 2014] [error] [client 127.0.0.1] (13)Permission denied: file permissions deny server access: /Library/WebServer/Documents/gbrowse2/index.html
[Thu Mar 20 11:08:32 2014] [error] [client 127.0.0.1] (13)Permission denied: file permissions deny server access: /Library/WebServer/Documents/gbrowse2/index.html
[Thu Mar 20 11:08:34 2014] [error] [client 127.0.0.1] (13)Permission denied: file permissions deny server access: /Library/WebServer/Documents/gbrowse2/index.html
[Thu Mar 20 11:09:58 2014] [error] [client 127.0.0.1] (13)Permission denied: file permissions deny server access: /Library/WebServer/Documents/gbrowse2/index.html

Thanks in advance and I look forward to the responses.
Matt



------------------------------------------------------------------------------
Learn Graph Databases - Download FREE O'Reilly Book
"Graph Databases" is the definitive new guide to graph databases and their
applications. Written by three acclaimed leaders in the field,
this first edition is now available. Download your free book today!
http://p.sf.net/sfu/13534_NeoTech
_______________________________________________
Gmod-gbrowse mailing list
[hidden email]<mailto:[hidden email]>
https://lists.sourceforge.net/lists/listinfo/gmod-gbrowse




--
------------------------------------------------------------------------
Scott Cain, Ph. D.                                   scott at scottcain dot net
GMOD Coordinator (http://gmod.org/)                     216-392-3087<tel:216-392-3087>
Ontario Institute for Cancer Research




--
------------------------------------------------------------------------
Scott Cain, Ph. D.                                   scott at scottcain dot net
GMOD Coordinator (http://gmod.org/)                     216-392-3087
Ontario Institute for Cancer Research
------------------------------------------------------------------------------
Learn Graph Databases - Download FREE O'Reilly Book
"Graph Databases" is the definitive new guide to graph databases and their
applications. Written by three acclaimed leaders in the field,
this first edition is now available. Download your free book today!
http://p.sf.net/sfu/13534_NeoTech_______________________________________________
Gmod-gbrowse mailing list
[hidden email]
https://lists.sourceforge.net/lists/listinfo/gmod-gbrowse



------------------------------------------------------------------------------
Learn Graph Databases - Download FREE O'Reilly Book
"Graph Databases" is the definitive new guide to graph databases and their
applications. Written by three acclaimed leaders in the field,
this first edition is now available. Download your free book today!
http://p.sf.net/sfu/13534_NeoTech
_______________________________________________
Gmod-gbrowse mailing list
[hidden email]
https://lists.sourceforge.net/lists/listinfo/gmod-gbrowse
Reply | Threaded
Open this post in threaded view
|

Re: 403 Forbidden

Matthew Johnson
Hey Guys,

Made some progress.  Navigated to /var/tmp/gbrowse2/locks and changed the directory “locks” permissions.  Initially it said:
biosci (me) —  Read and Write
_www — Read only
everyone — Read only

I just went ahead and changed _www and everyone to Read and Write and now I can use the example databases.

What exactly does apache see me as being?  I am the admin and normally use sudo in terminal.  I have the root password.  I noticed that as I was fixing the permissions, when I changed “everyone” to Read and Write or even Read only (when it initially said no access) it would fix the 403 Forbidden error.  Ultimately I would like our genomics lab to use this and we would like it on our website.  

Thanks, Matt

On Mar 21, 2014, at 7:55 AM, Matthew Johnson <[hidden email]> wrote:

Hi guys,

I fixed up the permission issues using chmod a+r command, I can now navigate to index.html and the links on that page without 403 forbidden.  Thanks for the help.  Although, when I click on the example databases (http://localhost/cgi-bin/gb2/gbrowse/yeast) I get the following:

500 internal service error

The server encountered an internal error or misconfiguration and was unable to complete your request.

Please contact the server administrator, [hidden email] and inform them of the time the error occurred, and anything you might have done that may have caused the error.

More information about this error may be available in the server error log.

So I check the error log and get the following:
[Fri Mar 21 07:42:29 2014] [error] [client 127.0.0.1] mkdir /var/tmp/gbrowse2/locks/1d: Permission denied at /Library/Perl/5.16/darwin-thread-multi-2level/Bio/Graphics/Browser2/Session.pm line 172.
[Fri Mar 21 07:42:29 2014] [error] [client 127.0.0.1] Premature end of script headers: gbrowse

@Tim Those notes were a life saver in my initial install.  I preferred those over the gbrowse wiki instructions.

Thanks again for all the help guys.
Matt


On Mar 20, 2014, at 1:33 PM, Timothy Parnell <[hidden email]> wrote:

Hi,

The apache user on OS X is _www, group is also _www. Another fine example of Think Different. Still, once you know these things and can account for them, you can easily run GBrowse on a Mac. It’s fine for individual or lab settings, but I would stick to linux for larger productions.

I’ve never had to enable virtual hosts on OS X, and it seems to work ok. The problems I’ve encountered is fixing ownerships for some of the /var/lib and /var/tmp locations. And then adding extra permissions to /etc/apache2/other/gbrowse2.conf like so

 <Directory "/Library/Webserver/CGI-Executables/gb2">
  Options ExecCGI
  SetEnv GBROWSE_CONF   "/etc/gbrowse2"
  # extra permissions
  Order allow,deny
  Allow from all
 </Directory>

I have some of my own notes for GBrowse and OS X  written up here
http://code.google.com/p/biotoolbox/wiki/SetupForMacOSX#Installing_GBrowse

Hope that helps.
Tim


On Mar 20, 2014, at 12:02 PM, Scott Cain <[hidden email]<[hidden email]>> wrote:

Hi Matt,

Odd, I'm not sure why the set-UID would be set for index.html since it's not an executable file, but the root of the problem is that the file isn't world readable or owned by the webserver owner (whose name I don't recall off hand).  The easiest way to fix this is to change the permissions on the file:

 sudo chmod a+r /Library/WebServer/Documents/gbrowse2/index.html

Given that you have this problem for the index file, you probably will have permissions problems with other files as well.

Scott



On Thu, Mar 20, 2014 at 1:45 PM, Matthew Johnson <[hidden email]<[hidden email]>> wrote:
Hi Scott,

Thanks for your reply.

"ls -l /Library/WebServer/Documents/gbrowse2/index.html" yielded the following:
-rwxr-s---  1 root  wheel  3968 Mar  6 20:29 /Library/WebServer/Documents/gbrowse2/index.html

Matt


On Mar 20, 2014, at 12:25 PM, Scott Cain <[hidden email]<[hidden email]>> wrote:

Hi Matt,

So what are the file permissions on index.html in /Library/WebServer/Documents/gbrowse2?  You could show us the output of `ls -l /Library/WebServer/Documents/gbrowse2/index.html` if you want.

It wouldn't surprise me if Apple put some strange restrictions on apache that I'm not aware of though.  I've been using Macs for several years but gave up on them as a test server because they are somewhat odd when it comes to standards.

Scott


On Thu, Mar 20, 2014 at 12:25 PM, Matthew Johnson <[hidden email]<[hidden email]>> wrote:
Hello everyone,

I have successfully installed GBrowse2 and its prerequisites on Mac OSX Mavericks.  I’m not all that familiar with Apache.  Here’s the problem:

I used to be able to see http://localhost/gbrowse2 but now I get 403 Forbidden, You don’t have permission to access /gbrowse2/index.html on this server.

That however is progress because yesterday I wasn’t able to see http://localhost<http://localhost/> with the same error message.  So I added:

<VirtualHost *:80>
ServerName localhost
DocumentRoot /Library/WebServer/Documents/
</VirtualHost>

to my virtual host conf file located in /etc/apache2/extra/httpd-vhosts.conf. I followed those instructions from: http://coolestguidesontheplanet.com/set-virtual-hosts-apache-mac-osx-10-9-mavericks-osx-10-8-mountain-lion/
so now when I visit http://localhost<http://localhost/> I get the “It Works!” string.

Here are the last five lines of my apache2 error log

[Thu Mar 20 11:08:14 2014] [error] [client 127.0.0.1] (13)Permission denied: file permissions deny server access: /Library/WebServer/Documents/gbrowse2/index.html
[Thu Mar 20 11:08:31 2014] [error] [client 127.0.0.1] (13)Permission denied: file permissions deny server access: /Library/WebServer/Documents/gbrowse2/index.html
[Thu Mar 20 11:08:32 2014] [error] [client 127.0.0.1] (13)Permission denied: file permissions deny server access: /Library/WebServer/Documents/gbrowse2/index.html
[Thu Mar 20 11:08:34 2014] [error] [client 127.0.0.1] (13)Permission denied: file permissions deny server access: /Library/WebServer/Documents/gbrowse2/index.html
[Thu Mar 20 11:09:58 2014] [error] [client 127.0.0.1] (13)Permission denied: file permissions deny server access: /Library/WebServer/Documents/gbrowse2/index.html

Thanks in advance and I look forward to the responses.
Matt



------------------------------------------------------------------------------
Learn Graph Databases - Download FREE O'Reilly Book
"Graph Databases" is the definitive new guide to graph databases and their
applications. Written by three acclaimed leaders in the field,
this first edition is now available. Download your free book today!
http://p.sf.net/sfu/13534_NeoTech
_______________________________________________
Gmod-gbrowse mailing list
[hidden email]<mailto:[hidden email]>
https://lists.sourceforge.net/lists/listinfo/gmod-gbrowse




--
------------------------------------------------------------------------
Scott Cain, Ph. D.                                   scott at scottcain dot net
GMOD Coordinator (http://gmod.org/)                     216-392-3087<tel:216-392-3087>
Ontario Institute for Cancer Research




--
------------------------------------------------------------------------
Scott Cain, Ph. D.                                   scott at scottcain dot net
GMOD Coordinator (http://gmod.org/)                     216-392-3087
Ontario Institute for Cancer Research
------------------------------------------------------------------------------
Learn Graph Databases - Download FREE O'Reilly Book
"Graph Databases" is the definitive new guide to graph databases and their
applications. Written by three acclaimed leaders in the field,
this first edition is now available. Download your free book today!
http://p.sf.net/sfu/13534_NeoTech_______________________________________________
Gmod-gbrowse mailing list
[hidden email]
https://lists.sourceforge.net/lists/listinfo/gmod-gbrowse




------------------------------------------------------------------------------
Learn Graph Databases - Download FREE O'Reilly Book
"Graph Databases" is the definitive new guide to graph databases and their
applications. Written by three acclaimed leaders in the field,
this first edition is now available. Download your free book today!
http://p.sf.net/sfu/13534_NeoTech
_______________________________________________
Gmod-gbrowse mailing list
[hidden email]
https://lists.sourceforge.net/lists/listinfo/gmod-gbrowse
Reply | Threaded
Open this post in threaded view
|

Re: 403 Forbidden

Scott Cain
Hi Matt,

Apache doesn't know anything about "you" (ie, your login account).  A common mistake made by people new to CGI is that they'll write a script that works just fine on the command line for them (because they have execute permission for example) doesn't work when being executed by apache, since the apache user (_www on Macs) doesn't have execute permission.  So, just because something works for you on the command line doesn't mean it will work for apache.  

So, things that GBrowse needs access to have to be read/writeable by the apache user, and it doesn't matter if your user or the root user have access to those things.  The easiest thing to do when debugging is to make things world writeable, but the more secure thing to do is to make them writeable by the apache user only by making the files/directories owned (using sudo chown) by _www.

Scott





On Fri, Mar 21, 2014 at 9:30 AM, Matthew Johnson <[hidden email]> wrote:
Hey Guys,

Made some progress.  Navigated to /var/tmp/gbrowse2/locks and changed the directory “locks” permissions.  Initially it said:
biosci (me) —  Read and Write
_www — Read only
everyone — Read only

I just went ahead and changed _www and everyone to Read and Write and now I can use the example databases.

What exactly does apache see me as being?  I am the admin and normally use sudo in terminal.  I have the root password.  I noticed that as I was fixing the permissions, when I changed “everyone” to Read and Write or even Read only (when it initially said no access) it would fix the 403 Forbidden error.  Ultimately I would like our genomics lab to use this and we would like it on our website.  

Thanks, Matt

On Mar 21, 2014, at 7:55 AM, Matthew Johnson <[hidden email]> wrote:

Hi guys,

I fixed up the permission issues using chmod a+r command, I can now navigate to index.html and the links on that page without 403 forbidden.  Thanks for the help.  Although, when I click on the example databases (http://localhost/cgi-bin/gb2/gbrowse/yeast) I get the following:

500 internal service error

The server encountered an internal error or misconfiguration and was unable to complete your request.

Please contact the server administrator, [hidden email] and inform them of the time the error occurred, and anything you might have done that may have caused the error.

More information about this error may be available in the server error log.

So I check the error log and get the following:
[Fri Mar 21 07:42:29 2014] [error] [client 127.0.0.1] mkdir /var/tmp/gbrowse2/locks/1d: Permission denied at /Library/Perl/5.16/darwin-thread-multi-2level/Bio/Graphics/Browser2/Session.pm line 172.
[Fri Mar 21 07:42:29 2014] [error] [client 127.0.0.1] Premature end of script headers: gbrowse

@Tim Those notes were a life saver in my initial install.  I preferred those over the gbrowse wiki instructions.

Thanks again for all the help guys.
Matt


On Mar 20, 2014, at 1:33 PM, Timothy Parnell <[hidden email]> wrote:

Hi,

The apache user on OS X is _www, group is also _www. Another fine example of Think Different. Still, once you know these things and can account for them, you can easily run GBrowse on a Mac. It’s fine for individual or lab settings, but I would stick to linux for larger productions.

I’ve never had to enable virtual hosts on OS X, and it seems to work ok. The problems I’ve encountered is fixing ownerships for some of the /var/lib and /var/tmp locations. And then adding extra permissions to /etc/apache2/other/gbrowse2.conf like so

 <Directory "/Library/Webserver/CGI-Executables/gb2">
  Options ExecCGI
  SetEnv GBROWSE_CONF   "/etc/gbrowse2"
  # extra permissions
  Order allow,deny
  Allow from all
 </Directory>

I have some of my own notes for GBrowse and OS X  written up here
http://code.google.com/p/biotoolbox/wiki/SetupForMacOSX#Installing_GBrowse

Hope that helps.
Tim


On Mar 20, 2014, at 12:02 PM, Scott Cain <[hidden email]<[hidden email]>> wrote:

Hi Matt,

Odd, I'm not sure why the set-UID would be set for index.html since it's not an executable file, but the root of the problem is that the file isn't world readable or owned by the webserver owner (whose name I don't recall off hand).  The easiest way to fix this is to change the permissions on the file:

 sudo chmod a+r /Library/WebServer/Documents/gbrowse2/index.html

Given that you have this problem for the index file, you probably will have permissions problems with other files as well.

Scott



On Thu, Mar 20, 2014 at 1:45 PM, Matthew Johnson <[hidden email]<[hidden email]>> wrote:
Hi Scott,

Thanks for your reply.

"ls -l /Library/WebServer/Documents/gbrowse2/index.html" yielded the following:
-rwxr-s---  1 root  wheel  3968 Mar  6 20:29 /Library/WebServer/Documents/gbrowse2/index.html

Matt


On Mar 20, 2014, at 12:25 PM, Scott Cain <[hidden email]<[hidden email]>> wrote:

Hi Matt,

So what are the file permissions on index.html in /Library/WebServer/Documents/gbrowse2?  You could show us the output of `ls -l /Library/WebServer/Documents/gbrowse2/index.html` if you want.

It wouldn't surprise me if Apple put some strange restrictions on apache that I'm not aware of though.  I've been using Macs for several years but gave up on them as a test server because they are somewhat odd when it comes to standards.

Scott


On Thu, Mar 20, 2014 at 12:25 PM, Matthew Johnson <[hidden email]<[hidden email]>> wrote:
Hello everyone,

I have successfully installed GBrowse2 and its prerequisites on Mac OSX Mavericks.  I’m not all that familiar with Apache.  Here’s the problem:

I used to be able to see http://localhost/gbrowse2 but now I get 403 Forbidden, You don’t have permission to access /gbrowse2/index.html on this server.

That however is progress because yesterday I wasn’t able to see http://localhost<http://localhost/> with the same error message.  So I added:

<VirtualHost *:80>
ServerName localhost
DocumentRoot /Library/WebServer/Documents/
</VirtualHost>

to my virtual host conf file located in /etc/apache2/extra/httpd-vhosts.conf. I followed those instructions from: http://coolestguidesontheplanet.com/set-virtual-hosts-apache-mac-osx-10-9-mavericks-osx-10-8-mountain-lion/
so now when I visit http://localhost<http://localhost/> I get the “It Works!” string.

Here are the last five lines of my apache2 error log

[Thu Mar 20 11:08:14 2014] [error] [client 127.0.0.1] (13)Permission denied: file permissions deny server access: /Library/WebServer/Documents/gbrowse2/index.html
[Thu Mar 20 11:08:31 2014] [error] [client 127.0.0.1] (13)Permission denied: file permissions deny server access: /Library/WebServer/Documents/gbrowse2/index.html
[Thu Mar 20 11:08:32 2014] [error] [client 127.0.0.1] (13)Permission denied: file permissions deny server access: /Library/WebServer/Documents/gbrowse2/index.html
[Thu Mar 20 11:08:34 2014] [error] [client 127.0.0.1] (13)Permission denied: file permissions deny server access: /Library/WebServer/Documents/gbrowse2/index.html
[Thu Mar 20 11:09:58 2014] [error] [client 127.0.0.1] (13)Permission denied: file permissions deny server access: /Library/WebServer/Documents/gbrowse2/index.html

Thanks in advance and I look forward to the responses.
Matt



------------------------------------------------------------------------------
Learn Graph Databases - Download FREE O'Reilly Book
"Graph Databases" is the definitive new guide to graph databases and their
applications. Written by three acclaimed leaders in the field,
this first edition is now available. Download your free book today!
http://p.sf.net/sfu/13534_NeoTech
_______________________________________________
Gmod-gbrowse mailing list
[hidden email]<mailto:[hidden email]>
https://lists.sourceforge.net/lists/listinfo/gmod-gbrowse




--
------------------------------------------------------------------------
Scott Cain, Ph. D.                                   scott at scottcain dot net
GMOD Coordinator (http://gmod.org/)                     <a href="tel:216-392-3087" value="+12163923087" target="_blank">216-392-3087<tel:<a href="tel:216-392-3087" value="+12163923087" target="_blank">216-392-3087>
Ontario Institute for Cancer Research




--
------------------------------------------------------------------------
Scott Cain, Ph. D.                                   scott at scottcain dot net
GMOD Coordinator (http://gmod.org/)                     <a href="tel:216-392-3087" value="+12163923087" target="_blank">216-392-3087
Ontario Institute for Cancer Research
------------------------------------------------------------------------------
Learn Graph Databases - Download FREE O'Reilly Book
"Graph Databases" is the definitive new guide to graph databases and their
applications. Written by three acclaimed leaders in the field,
this first edition is now available. Download your free book today!
http://p.sf.net/sfu/13534_NeoTech_______________________________________________
Gmod-gbrowse mailing list
[hidden email]
https://lists.sourceforge.net/lists/listinfo/gmod-gbrowse






--
------------------------------------------------------------------------
Scott Cain, Ph. D.                                   scott at scottcain dot net
GMOD Coordinator (http://gmod.org/)                     216-392-3087
Ontario Institute for Cancer Research

------------------------------------------------------------------------------
Learn Graph Databases - Download FREE O'Reilly Book
"Graph Databases" is the definitive new guide to graph databases and their
applications. Written by three acclaimed leaders in the field,
this first edition is now available. Download your free book today!
http://p.sf.net/sfu/13534_NeoTech
_______________________________________________
Gmod-gbrowse mailing list
[hidden email]
https://lists.sourceforge.net/lists/listinfo/gmod-gbrowse