owncloud in webroot - 404 error on specific php request

Discussion in 'ISPConfig 3 Priority Support' started by daniel712, Apr 25, 2023.

Tags:
  1. daniel712

    daniel712 Member HowtoForge Supporter

    debian 11 - php 7.4 - oc latest

    When installing owncloud in the webroot (setup and login without problems), i get following 404 errors on specific php requests for, e.g. ./apps/firstrunwizard/wizard.php and ./apps/files/ajax/getstoragestats.php
    The install is not usable, because it causes following errors after login (yellow on top...):
    - "access of folder / failed"
    - "not enough free disk space, you want to upload xxKB, but only 0B available" (on upload request)

    Anybody an idea to this? (install, nginx and php config according oc documenattion, php base dir is open).
    The strange thing is, when i do the exact same install in a subdirectory of ./web, e.g. ./web/owncloud
    => normal ops... ???
    Thanks a lot for help!

    access.log
    Code:
    [25/Apr/2023:21:06:25 +0200] "POST /login HTTP/2.0" 303 0 "-" "Mozilla/5.0 (X11; Linux x86_64; rv:102.0) Gecko/20100101 Firefox/102.0"
    [25/Apr/2023:21:06:25 +0200] "GET /apps/files/ HTTP/2.0" 200 34911 "-" "Mozilla/5.0 (X11; Linux x86_64; rv:102.0) Gecko/20100101 Firefox/102.0"
    [25/Apr/2023:21:06:26 +0200] "GET /core/js/oc.js?v=0ec32ce038eb1e78c536c48105553b70 HTTP/2.0" 200 5509 "-" "Mozilla/5.0 (X11; Linux x86_64; rv:102.0) Gecko/20100101 Firefox/102.0"
    [25/Apr/2023:21:06:26 +0200] "GET /index.php/apps/firstrunwizard/wizard.php HTTP/2.0" 404 1807 "-" "Mozilla/5.0 (X11; Linux x86_64; rv:102.0) Gecko/20100101 Firefox/102.0"
    [25/Apr/2023:21:06:26 +0200] "GET /cron.php HTTP/2.0" 302 0 "-" "Mozilla/5.0 (X11; Linux x86_64; rv:102.0) Gecko/20100101 Firefox/102.0"
    [25/Apr/2023:21:06:26 +0200] "GET /ocs/v2.php/apps/notifications/api/v1/notifications?format=json HTTP/2.0" 200 108 "-" "Mozilla/5.0 (X11; Linux x86_64; rv:102.0) Gecko/20100101 Firefox/102.0"
    [25/Apr/2023:21:06:26 +0200] "PROPFIND /remote.php/dav/files/dev-admin/ HTTP/2.0" 207 2988 "-" "Mozilla/5.0 (X11; Linux x86_64; rv:102.0) Gecko/20100101 Firefox/102.0"
    [25/Apr/2023:21:06:26 +0200] "GET /index.php/apps/files/ajax/getstoragestats.php?dir=%2F HTTP/2.0" 404 1807 "-" "Mozilla/5.0 (X11; Linux x86_64; rv:102.0) Gecko/20100101 Firefox/102.0"
    [25/Apr/2023:21:06:26 +0200] "GET /index.php/cron HTTP/2.0" 200 2 "-" "Mozilla/5.0 (X11; Linux x86_64; rv:102.0) Gecko/20100101 Firefox/102.0"
    [25/Apr/2023:21:06:56 +0200] "GET /ocs/v2.php/apps/notifications/api/v1/notifications?format=json HTTP/2.0" 200 108 "-" "Mozilla/5.0 (X11; Linux x86_64; rv:102.0) Gecko/20100101 Firefox/102.0"
    
     
  2. nhybgtvfr

    nhybgtvfr Well-Known Member HowtoForge Supporter

    my guess would be that it's trying to create folders or files in / ie. outside of the website docroot.
    it works if you try installing to /web/owncloud because it would then try to create these folders/files in /web, which it is allowed to do.

    without knowing what it's trying to create, and why, i don't know if having them outside /web is safe or workable, and i don't know if having them inside /web is safe either.

    i see 3 options for your installation..
    1. just install owncloud into a subfolder of /web, and hope that whatever it creates in web is safe to be publicly accessible.
    2. remove the immutable flag from /var/www/clients/client#/web# run the install, and make the folder immutable again.. making whatever it creates in / inaccessible to the public
    3. same as 1. but set the sites docroot to the subfolder in the apache/nginx directives field on the website options tab in the control panel, making whatever it creates directly in /web inaccessible to the public.
     
  3. daniel712

    daniel712 Member HowtoForge Supporter

    I'm not sure about that... but i will see on other installs in subfolders, whether oc creates files above its own install root...
    Furthermore my 404 error is regarding files in ./apps/...

    Thanks for your help!
     
  4. nhybgtvfr

    nhybgtvfr Well-Known Member HowtoForge Supporter

    the 404 error maybe regarding files in ./apps/.. that may be unable to access that file.. or unable to access a file referenced by a file in ./apps/..

    and
    - "access of folder / failed"
    - "not enough free disk space, you want to upload xxKB, but only 0B available" (on upload request)
    indicates it's trying to access and write something to /, which it's not allowed to do.
     
  5. daniel712

    daniel712 Member HowtoForge Supporter

    Ok. I looked it up: OC is definitly not writing above its own install root ./owncloud
    In none of my subdirectory installations i can locate files above... Must be something else!
    I think with / he is referring to HIS install root, e.g. /web/owncloud or /web in case of a installation in the webroot like i want to accomplish...
     
  6. nhybgtvfr

    nhybgtvfr Well-Known Member HowtoForge Supporter

  7. daniel712

    daniel712 Member HowtoForge Supporter

Share This Page