1000 FAQs, 500 tutorials and explanatory videos. Here, there are only solutions!
Resolve a 403 error as a website visitor
This guide explains what you need to determine as a website visitor if you encounter a 403 error to resolve this issue.
What is the 403 error?
The HTTP 403 error code generally means that access to a resource is denied to the client by the server.
In what case does this error occur?
The user is not authenticated: the server requires the user to identify themselves to access the resource. This can be the case for private pages requiring authentication, for example.
The user is authenticated but does not have the necessary permissions: the server recognizes the user but does not authorize them to access the requested resource due to permission or role restrictions. This cause of 403 error may be an incorrect permission issue on a folder or file. For a folder, the error message is of type "403 Forbidden", for a file, "failed to open stream: Permission denied". In this case, you must verify that the permissions of your folders/files are correct, i.e., a minimum of 644 for a file and 755 for a folder. Refer to this other guide.
The user's IP address is blocked or restricted: the server may block access to a specific IP address for security reasons, protection against attacks... Refer to this other guide.
The requested resource does not exist on the server: in this case, the server returns a 403 error instead of a 404 error to avoid disclosing confidential information. If you are simply trying to access your homepage or a part of your site by indicating an address of type www.domain.xyz or www.domain.xyz/folder/ make sure there is a homepage named "index.html or .htm or .php" placed in the correct location (at the root of your FTP space, in the /web directory, or in the /folder/ directory). Refer to this other guide.
Additionally, check that there are no uppercase letters in the file name; all file or folder names present must be in lowercase, without accents or spaces.
Script-related error: if you were running a script, filling out a form, uploading a file online, and you get this type of message:
Accès interdit!
Vous n'avez pas le droit d'accéder à l'objet demandé.
Soit celui-ci est protégé, soit il ne peut être lu par le serveur.
Si vous pensez qu'il s'agit d'une erreur du serveur, veuillez contacter le gestionnaire du site.
Error 403the cause may be a filter that prevents the unwanted use of scripts by spammers. Indeed, the Infomaniak antivirus blocks the uploading of files via scripts or via FTP. This concretely means that when a hacker sends a file identified as a virus via a form, an insecure script, or via FTP, its installation is directly blocked, the file is not uploaded to the server, and the upload generates a 403 error.
In case of a false positive, contact Infomaniak support by providing the URL of the page where you encounter this error message to precisely diagnose the origin of the problem.
However, there are many other cases in which you might receive a "403 forbidden" message and for very diverse reasons (PHP, perl, mod_security, .htaccess scripts, ...).