.htaccess 403 forbidden on new cPanel litespeed server

Discussion in 'Install/Configuration' started by mauzilla, Apr 24, 2018.

  1. mauzilla

    mauzilla New Member

    We've setup a new cPanel server and installed Litespeed. We're in process of migrating some clients from our old cPanel server (also litespeed, all sites worked) to the new server. Apart from installing litespeed no further configuration has been done.
    For one of our sites migrated we're getting an error 403 access denied. If we log into the Litespeed admin console the errors are also visible there as:

    [HTAccess] Failed to open [/home/user/public_html/ocart/.htaccess]: Permission denied

    I can confirm that the user account has ownership and group:

    [root@rcp1 ocart]# ls -la
    -rw-r--r-- 1 user user 321 Mar 5 11:32 .htaccess

    Any ideas where we can start troubleshooting?
     
  2. NiteWave

    NiteWave Administrator

    please check owner/group/permissions of /home/user/public_html
    should be user:nobody, 710
    .htaccess is accessed by litepseed process which is running as nobody
     
  3. mauzilla

    mauzilla New Member

    Thanks for the fast reply NiteWave!!
    Permissions appears correct:
    (I have replaced the actual user with "user" but nobody is still as it should be).

    drwxr-x--- 6 user nobody 4096 Apr 24 10:35 public_html

    It's worth mentioning that the site giving the issue is within a subfolder in public_html/ (so public_html/ocart) - We're able to access the landing page located in public_html/index.php just fine, but the site located in the ocart/ subdirectory appears to be inaccessible. Herewith the permissions for that folder:

    drwxr-x--- 9 user user 4096 Apr 24 10:31 ocart
     
  4. NiteWave

    NiteWave Administrator

    then, you need run
    #chmod o+x ocart
    so that nobody user can access static files plus .htaccess under ocart
     

Share This Page