![]() ![]() If mod_security rules are enabled, they may be triggerred for 403 error. In most cases your IP address will be denied in the system firewall (iptables, firewalld etc) and you need to remove your IP address in order to avoid the error. are enabled, depending on what and how many requests you are doing for a particular website, the firewall can block you. If Mod Security, WAF, fail2ban, CPHulk, etc. To fix the problem, either change all files user:group to user:user ( in the above example, that would be jsmith:jsmith), or disable Force Strict Ownership in LSWS Admin. If it is different, a 403 Access Denied error will be returned. If it is enabled, the web server will check if the owner of the file being served is the same as the owner of the virtual host. The Force Strict Ownership setting in LSWS Admin specifies whether to enforce strict file ownership checking. home/jsmith/public_html>ls -ald images/detailedĭrwxrwxrwx 51 jsmith jsmith 4096 Apr 11 13:16 images/detailedĭrwxrwxrwx 48 jsmith jsmith 4096 Mar 31 16:30 images home/jsmith/public_html>ls -ald images/detailed/130ĭrwxrwxrwx 2 nobody nobody 36864 Apr 14 15:12 images/detailed/130 Switch off Change REST API Path from Hide My WP > Change Paths and test again. Switch off the options Disable XML-RPC access from Hide My WP > Tweaks and test again. Make sure the cache is purged after you change the paths in Hide My WP. rw-rw-rw- 1 nobody nobody 103609 Apr 12 11:21 images/detailed/130/Untitled-1-Recovered_urba-uz.jpg Recently, one of our customers came with a website issue after switching to LiteSpeed. As you have a LiteSpeed server, you probably have a LiteSpeed cache purge option. home/jsmith/public_html>ls -ald images/detailed/130/Untitled-1-Recovered_urba-uz.jpg That can trigger the error, as test1 will not have permission to read the file or the directory. Lets say that your public_html directory is owned by the username test, and you try to create a file index.php as user test1. Make sure that the file or directory belongs to the correct user. Fix the premissions, and the error goes away. If the file or directory has the wrong permissions, you may see Error 403. If it doesn’t happen to Apache but only happens to LSWS, you can log a ticket with us to take a further look. What Causes 403 Forbidden Errors Different web servers report 403 Forbidden errors in different ways, the majority of which weve listed below (see the Common 403 Error Messages section). If it happens to both Apache and LSWS, you can look at the following possible causes yourself to find the root of the problem. The 403 Forbidden error is an HTTP status code that means that access to the page or resource you were trying to reach is blocked for some reason. You can try to switch to Apache and see if the error continues. Most of the time, the error is related to a permission issue, configuration restriction, security settings, mod_security etc. Generally, it is not LiteSpeed Web Server causing 403 response codes. The most important thing is to check the log files when you get the error, as they will show the cause in most cases. Error 403 Forbidden can be triggered by many things, and in this guide we will show you most of them. ![]()
0 Comments
Leave a Reply. |