Error 403 - Forbidden, Access denied

10240
8
05-08-2013 04:52 AM
SeanMyers1
New Contributor
I can see a map with my data points.  But when I select on one and click on More Info, I get
[INDENT]"Error 403 - Forbidden

You don't have permission to access the requested resource. Please contact the web site owner for further assistance."[/INDENT]

The permissions on my files were the standard 744, but I have changed them to 777 on everything, and still get Error 403.
That means it is a permissions error.  But you can't give more permission than 777 (Everyone on Earth has full Read, Write and Execute).

I am new to ArcGIS.  Can someone with a little more experience suggest something ?

Thank you!
Tags (2)
0 Kudos
8 Replies
MikeMinami
Esri Notable Contributor
What kind of data did you add to your map?
Is possible, can you share your map publicly and post the URL here?

Thanks,

Mike
0 Kudos
SeanMyers1
New Contributor
Thank you Mike.

That would make the most sense.  And of couse that World Writable permissios 777 has to go.  But unfortunately the client isn't ready for the world to peruse the maps and photos. 

The data is about 500 MB of photos.  I access them by signing in to ArcGISOnline then clicking on MAP.  The map shows up, with my data points.  Each data point is a photo.  When I click on one of the data points I see a lot of data, with "more info" near the bottom.  It's when I click on "more info" that I get the Error 403 - Forbidden.

I will ask for permission to share so you can better see what I am dealing with, but simply don't have the authority to release it until then.

Thank you very much for any suggestions.
0 Kudos
MikeMinami
Esri Notable Contributor
Ok, now I understand a little better.

It appears that the attributes of your data has a URL field. The More Info link simply allows you to access that URL. The URL to the photo (I assume) is not accessible on the web.

Look at your source data and the field displaying the More Info. Copy the URL and paste it into the browser address bar. You will likely see the same error message. You need to somehow open up access to the URL.

Thanks,

Mike
0 Kudos
SeanMyers1
New Contributor
I thought the same thing however, that's not the case.

If I copy and past the 403 error url into another new browser window then the picture opens right up with no issue.

Map Title: RHIT_Test_Map
URL: http://services1.arcgis.com/qKq3G4lzjU5PpK5E/arcgis/rest/services/RHIT_Utility/FeatureServer/0

I only get the 403 error when opening the picture through the html pop up window from the point feature in the map viewer on ArcGIS Online.


Thanks!
0 Kudos
MikeMinami
Esri Notable Contributor
When you click the More Info link, we pass in a referer. Here's the Fiddler recorded request. If you remove the referer, the URL works. That's why when you enter the URL directly in the web browser it works. You web server seems to be blocking requests from a web site.

Host: myersengineering.com
Connection: keep-alive
Accept: text/html,application/xhtml+xml,application/xml;q=0.9,*/*;q=0.8
User-Agent: Mozilla/5.0 (Windows NT 6.1; WOW64) AppleWebKit/537.31 (KHTML, like Gecko) Chrome/26.0.1410.64 Safari/537.31
Referer: http://www.arcgis.com/home/webmap/viewer.html?useExisting=1
Accept-Encoding: gzip,deflate,sdch
Accept-Language: en-US,en;q=0.8
Accept-Charset: ISO-8859-1,utf-8;q=0.7,*;q=0.3

Thanks,

Mike
0 Kudos
SeanMyers1
New Contributor
Thank you very much Mike!  I think we are making progress.

To view our project you can select ArcGIS Online and search on RHIT, or you can find it at http://myersengineering.com/ArcGIS.html

I uploaded one of the photos to Photo Bucket and changed the link  on a data point to point there and it worked.

Likewise you can look directly at http://myersengineering.com/ESRI/Images/4-22-13/PICT0032.JPG and see the photo with no problems.  If the permissions on the photo were not correct you could not see it.

And when I go to the ArcGIS Online map and select a data point, and hover my cursor over "more info" it show the same path as above, but clicking it gets Error 403, indicating a permissions problem.

You mentioned a referrer.  How do I correct what I have to properly accommodate the referrer?

Since you can now see our map with data points, and our online data, you should have both sides of the equation. 

You said "If you remove the referer, the URL works. "  That means the permissions on the file don't block it.
Then you said "Your web server seems to be blocking requests from a web site."
This part I don't quite understand.  The permissions right now are 777, that means World Read, Write and Execute for everyone, far more than anyone needs.  More permission than that does not exist and cannot be given.

The only time the Error 403 happens is when your referrer is involved. 

I will be happy to make whatever changes are necessary to make sure my web server does not block any website.  Can you tell me what website is being blocked, give me a hint on what access needs to be opened up?

Thank you!
0 Kudos
SeanMyers1
New Contributor
Here is our .htaccess file.  I don't see anything in it that could block anyone, but if websites are being blocked, this is where that should occur, so please tell me if you see anything that needs adjusted.

<IfModule mod_deflate.c>
    AddOutPutFilterByType DEFLATE text/html text/plain text/xml
    <IfModule mod_setenvif.c>
        # Netscape 4.x has some problems...
        BrowserMatch ^Mozilla/4 gzip-only-text/html
       
        # Netscape 4.06-4.08 have some more problems
        BrowserMatch ^Mozilla/4\.0[678] no-gzip
       
        # MSIE masquerades as Netscape, but it is fine
        # BrowserMatch \bMSIE !no-gzip !gzip-only-text/html
       
        # NOTE: Due to a bug in mod_setenvif up to Apache 2.0.48
        # the above regex won't work. You can use the following
        # workaround to get the desired effect:
        BrowserMatch \bMSI !no-gzip !gzip-only-text/html
       
        # Don't compress images
        SetEnvIfNoCase Request_URI .(?:gif|jpe?g|png)$ no-gzip dont-vary
    </IfModule>
   
    <IfModule mod_headers.c>
        # Make sure proxies don't deliver the wrong content
        Header append Vary User-Agent env=!dont-vary
    </IfModule>
</IfModule>
0 Kudos
SeanMyers1
New Contributor
*** SOLVED ***

I created custom error pages and added them to our .htaccess file. 
Immediately the problem disappeared.

Here is our new htaccess file  :  )
<IfModule mod_deflate.c>
    AddOutPutFilterByType DEFLATE text/html text/plain text/xml
    <IfModule mod_setenvif.c>
# Custom Error pages
ErrorDocument 403 /403Error.html
ErrorDocument 404 /404Error.html

        # Netscape 4.x has some problems...
        BrowserMatch ^Mozilla/4 gzip-only-text/html
       
        # Netscape 4.06-4.08 have some more problems
        BrowserMatch ^Mozilla/4\.0[678] no-gzip
       
        # MSIE masquerades as Netscape, but it is fine
        # BrowserMatch \bMSIE !no-gzip !gzip-only-text/html
       
        # NOTE: Due to a bug in mod_setenvif up to Apache 2.0.48
        # the above regex won't work. You can use the following
        # workaround to get the desired effect:
        BrowserMatch \bMSI !no-gzip !gzip-only-text/html
       
        # Don't compress images
        SetEnvIfNoCase Request_URI .(?:gif|jpe?g|png)$ no-gzip dont-vary
    </IfModule>
   
    <IfModule mod_headers.c>
        # Make sure proxies don't deliver the wrong content
        Header append Vary User-Agent env=!dont-vary
    </IfModule>
</IfModule>


Thank you very much Mike.  You were a great help!
0 Kudos