Questions tagged [http-status-code-403]

The 403 or "Forbidden" error message is a HTTP standard response code indicating that the request was legal and understood but the server refuses to respond to the request.

A 403 Forbidden may be returned by a web server due to an authorization issue or other constraint related to the request. File permissions, lack of encryption, and maximum number of users reached (among others) can all be the cause of a 403 response.

2271 questions
30
votes
8 answers

Node JS: Sendgrid Mail 403 'Forbidden' error

I am sending a very straightforward email using Send grid in my node js project. But I get returned a 403 Forbidden error. The API Key has full access. The code is also correctly integrated, as I used another API Key from another account and it…
iqra
  • 1,061
  • 1
  • 11
  • 18
30
votes
2 answers

How can I throw a 403 exception in Symfony2?

I am doing a check if there is a specific token in my request URI and throw a Symfony\Component\Security\Core\Exception\AccessDeniedException if there is no token or the token is wrong. if(!isset($token) && $token != 'whatever') { throw new…
Gottlieb Notschnabel
  • 9,408
  • 18
  • 74
  • 116
30
votes
4 answers

Is there a way to force apache to return 404 instead of 403?

Is there a way how I can configure the Apache web server to return a 404 (not found) error code instead of 403 (forbidden) for some specific directories which I want to disallow to be accessed? I found some solutions suggesting the use of…
29
votes
5 answers

403 forbidden: permission to access images

I'm currently building a new version of a site in Wordpress and trying to add a few images as normal to be referenced both by CSS & HTML. Weirdly it's allowed me to add several images like the logo etc yet when I try to add a few more images it's…
Rob
  • 6,304
  • 24
  • 83
  • 189
27
votes
5 answers

Jquery POST giving 403 forbidden error in spring mvc

I want to make a ajax call using $.POST. But I am getting 403 error. But GET works perfectly fine. My code is: var url = "/xyz/abc/subscribe?name="+name; $.post(url, function(data){ alert(data); }); The controller code is…
user3729782
  • 271
  • 1
  • 3
  • 4
26
votes
5 answers

java.io.IOException: Server returned HTTP response code: 403 for URL

I want to download the mp3 file from url : "http://upload13.music.qzone.soso.com/30671794.mp3", i always got java.io.IOException: Server returned HTTP response code: 403 for URL. But it's ok when open the url using browser. Below is part of my…
Adao
  • 261
  • 1
  • 3
  • 3
26
votes
7 answers

Access denied (403) for PHP files with Nginx + PHP-FPM

I have been spending few hours on that issue and despite the high number of posts related to it, I cannot solve it. I have a Fedora 20 box with Nginx + PHP-FPM that worked quite good until today (after I reloaded php-fpm.service I guess). Nginx is…
feub
  • 547
  • 2
  • 10
  • 22
24
votes
1 answer

Random 403 errors with apache+php-fpm

On a server of mine, running Ubuntu 14.04.5 with Apache 2.4.23 and php-fpm 7.0.11, I'm getting random 403 errors. I say "random" because the page I see in logs with 403 are running fine when I try them. Also, I experienced directly (I mean by…
Massimiliano Arione
  • 2,422
  • 19
  • 40
23
votes
4 answers

Custom Error 403 Page PHP

I created a .htaccess inside a directory in which I don't want the files to be directly accessed. It works and fires the default 403 page (Access forbidden!) of the Apache server. How can I create a custom 403 page? Thanks!
fart-y-goer
  • 747
  • 3
  • 8
  • 27
23
votes
2 answers

Trigger a HTTP error in Rails

I'm trying to call a custom instance of a 403 HTTP error in Rails but I can't seem to figure out how to do this... I have several user authentication roles and basically if a role tries to browse to an area that it is not authorised to visit I want…
Ganesh Shankar
  • 4,826
  • 8
  • 43
  • 56
20
votes
7 answers

Error 403. Wamp Server

I have installed wamp server 2.2 I'm using windows 7 When I am online at that time i'm not able to find localhost using WaMp its giving me some Forbidden Error..You Don't have Access kind of error. But when I disconnect my internet connection, I…
Noman
  • 407
  • 1
  • 5
  • 10
20
votes
1 answer

AngularJs routeProvider http status 403

I'm doing authentication and authorization in the server side. In angularJs I'm doing the routing using the routeProvider like this. $routeProvider. when('/', { templateUrl: 'partials/_home', controller: 'HomeCtrl' …
20
votes
6 answers

Lighttpd 403 Forbidden for PHP files

I've just installed lighttpd on my dedicated server, mod_fastcgi is enabled, so I've appended the following lines to the lighttpd.conf file: fastcgi.server = ( ".php" => ( "localhost" => ( "socket" =>…
Scott
  • 5,991
  • 15
  • 35
  • 42
19
votes
4 answers

Mutual certificates authentication fails with error 403.16

I'm using Windows Server 2012 and IIS 8.5. I've set SSL for the website and the SSL Settings are: Require Required and Require Client Certificates. The client certificate that I'm sending to the server has been issued by a self-signed authority…
Javier Holguera
  • 1,301
  • 2
  • 11
  • 27
18
votes
5 answers

Always return a 404 when you decide to return a 403

There are several questions already posted here about returning a 404 instead of a 403 in special cases (e.g., .ht* files or a certain directory), but I can't figure out how to simply replace all 403 responses ("Okay, it exists, but you still have…
Glen
  • 652
  • 2
  • 6
  • 12