DocumentRoot outside of /usr/local/lsws

Discussion in 'OpenLiteSpeed Bug Reports' started by enthess, Feb 14, 2017.

  1. lsfoo

    lsfoo Administrator

    Are the permissions currently set up for the user? I know you mentioned changing the permissions around, maybe it's an issue with setting the docroot to match the parent directory? (/home/user/html/ should be same user/group as /home/user)
     
  2. enthess

    enthess Member

    Yes, the permissions are correct... now i even created files as the user itself (su user)
    Still 404 not found.
    Not seeing any debug in logs at all... Not seeing anything :/, disturbs me!
     
  3. lsfoo

    lsfoo Administrator

    OK, could you enable debug log (debuglevel 10) and visit the page? Perhaps it will tell us why it went to a 404.
     
  4. enthess

    enthess Member

    Now i added that access and error-log should be output to /home/user/-dir, it works OK, and user nobody:nobody writes to access-log (no errors thou)
     
  5. lsfoo

    lsfoo Administrator

    Could you pm me the error log? I need to look through to see if there's any clues.
     
  6. enthess

    enthess Member

    2017-02-14 16:06:58.456 [DEBUG] [192.168.175.165:56433#cgBoxCheck] Find context with URI: [/], location: [/home/user/cg/html/].
    2017-02-14 16:06:58.456 [DEBUG] [192.168.175.165:56433#cgBoxCheck] (stat)File not found [/home/user/cg/html/index.html].
    2017-02-14 16:06:58.456 [DEBUG] [192.168.175.165:56433#cgBoxCheck] Cannot find appropriate handler for [/index.html].

    # pwd
    /home/user/cg/html
    [root@stefans html]# ls
    index.html


    It makes no sense at all :/ "file not found" but I SEEE IT!!! *drives me nuts*
     
  7. lsfoo

    lsfoo Administrator

    If you check what user the server is running as, could you su to that user and see if you can get to that directory? The only possible cause is permissions. (which would cause the server to think that the file does not exist)
     
  8. enthess

    enthess Member

    Hello again,

    #su nobody
    This account is currently not available.

    Also, i chmodded the dir to nobody:nobody, but still without success.. i believe same as u, permissions...
     
  9. lsfoo

    lsfoo Administrator

    When you ls -l, what are the permissions exactly?
     
  10. lsfoo

    lsfoo Administrator

    All of my permissions for that directory are:
    rwxrw-rw- user:group
     
  11. enthess

    enthess Member

    -rw-rw-r-- 1 nobody nobody 12 Feb 14 15:58 index.html
     
  12. lsfoo

    lsfoo Administrator

    next questions would be about the directories above.

    My stuff is in /home/user/wordpress/html:


    drwxrwxr-x 7 user user 4096 Jan 12 09:03 wordpress/

    drwxrwxr-x 9 user user 4096 Feb 13 09:15 html/

    -rwxrw-rw- 1 user user 418 Jan 17 10:37 index.php
     
  13. enthess

    enthess Member

    i did find this thread (https://www.litespeedtech.com/suppo...ot-open-directory-for-uri-404-not-found.3762/)
    which gave me this command (sudo -u nobody cat /home/user/cg/html/index.html), and this command gives me "permission denied" however i cant see why....

    :/

    So i am messing around with permissions, sorry for disturbing you so much ^^
     
  14. lsfoo

    lsfoo Administrator

    Let me know if you find a winning combination, this is an odd issue.
     
  15. enthess

    enthess Member

    Well... if i CD to /home/user/html/ and "sudo -u nobody cat index.html" everything is OK, (i see html code)

    if i however "sudo -u nobody cat /home/user/html/index.html", i get permission denied...

    I have chmodded the files to user:nobody and added user to nobody-group, but still same error... Sadly theres not alot info on internet about this :/
     
  16. lsfoo

    lsfoo Administrator

    Perhaps it is an issue with the directory?
     
  17. enthess

    enthess Member

    Finally found it,

    I had to chmod 711 to /home/user . Can you verify that your home/user is "drwx--x--x. " ??
     
    lsfoo likes this.
  18. lsfoo

    lsfoo Administrator

    Awesome!

    My /home/user is

    drwxr-xr-x 36 user user 4096 Feb 14 12:05 user/
     
  19. enthess

    enthess Member

    Then that was the error, my home/user was per default only 700.

    weird, i just added user with "useradd user"...
     
  20. lsfoo

    lsfoo Administrator

    Glad you were able to find it. We'll see if we can add something that handles this issue.
     

Share This Page