Ergebnis 1 bis 14 von 14

Thema: Installation fails: ERROR 500 Failed to create ...:mkdir(): Permission denied.

  1. #1
    Contao-Nutzer
    Registriert seit
    20.05.2019.
    Beiträge
    6

    Standard Installation fails: ERROR 500 Failed to create ...:mkdir(): Permission denied.

    Hi there,

    I set up froxlor on my server and created a user account to host a small web page there.
    As user i created an empty web directory, put the current contao-manager.phar in there and renamed it to contao-manager.phar.php.
    The root directory of the web server is pointing to the subdir web (as mentioned in this german threads [1] or [2]). However, when calling it in a browser, the error message reads
    Code:
    ERROR 500 Failed to create "/var/customers/webs/myuser/contao-manager": mkdir(): Permission denied.
    When looking in the webspace for that user, the web folder has access rights 755.

    The server runs Ubuntu 18.04 LTS @ 4.15.0, Apache/2.4.29m mysql 5.7.25, PHP 7.2.17 with following plugins:
    Code:
    $ php -m
    [PHP Modules]
    bcmath
    calendar
    Core
    ctype
    curl
    date
    dom
    exif
    fileinfo
    filter
    ftp
    gd
    gettext
    hash
    iconv
    imagick
    intl
    json
    libxml
    mbstring
    mysqli
    mysqlnd
    openssl
    pcntl
    pcre
    PDO
    pdo_mysql
    Phar
    posix
    readline
    Reflection
    session
    shmop
    SimpleXML
    sockets
    sodium
    SPL
    standard
    sysvmsg
    sysvsem
    sysvshm
    tokenizer
    wddx
    xml
    xmlreader
    xmlwriter
    xsl
    Zend OPcache
    zip
    zlib
    
    [Zend Modules]
    Zend OPcache
    What am i missing?

    [1] https://community.contao.org/de/show...mission-denied
    [2] https://community.contao.org/de/show...-Error-500-aus

  2. #2
    Wandelndes Contao-Lexikon Avatar von tab
    Registriert seit
    22.10.2013.
    Beiträge
    10.076
    Contao-Projekt unterstützen

    Support Contao

    Standard

    Probably you have a problem with open_basedir. /var/customers/webs/myuser/ should be allowed there.

  3. #3
    Contao-Nutzer
    Registriert seit
    20.05.2019.
    Beiträge
    6

    Standard

    Zitat Zitat von tab Beitrag anzeigen
    Probably you have a problem with open_basedir. /var/customers/webs/myuser/ should be allowed there.
    I should have clarified that before: In froxlor i explicitly turned the Open Basedir option off for that domain.
    Turning it on just gives
    Code:
    ERROR 500 Failed to create "/var/customers/webs/myuser/contao-manager": mkdir(): open_basedir restriction in effect. File(/var/customers/webs/myuser/contao-manager) is not within the allowed path(s): (/var/customers/webs/myuser/web:/tmp).
    As far as i remember, after reading that error i turned it off and got the 500 error from the first post.

  4. #4
    Community-Moderator
    Wandelndes Contao-Lexikon
    Avatar von Spooky
    Registriert seit
    12.04.2012.
    Ort
    Scotland
    Beiträge
    34.063
    Partner-ID
    10107

    Standard

    You need to make sure that the web process is allowed to create files and directories within /var/customers/webs/myuser

  5. #5
    Contao-Nutzer
    Registriert seit
    20.05.2019.
    Beiträge
    6

    Standard

    Zitat Zitat von Spooky Beitrag anzeigen
    You need to make sure that the web process is allowed to create files and directories within /var/customers/webs/myuser
    I actually thought changing the access rights to write-enabled for all users would be sufficient. Seemingly it wasn't; however changing the ownership brought me one step further:
    Code:
    # chown -R www-data:www-data /var/customers/webs
    Where i got stuck with the system's check.
    Geändert von DZoom (11.06.2019 um 21:26 Uhr)

  6. #6
    Community-Moderator
    Wandelndes Contao-Lexikon
    Avatar von Spooky
    Registriert seit
    12.04.2012.
    Ort
    Scotland
    Beiträge
    34.063
    Partner-ID
    10107

    Standard

    Did you click on "Configure" yet?

  7. #7
    Contao-Nutzer
    Registriert seit
    20.05.2019.
    Beiträge
    6

    Standard

    Zitat Zitat von Spooky Beitrag anzeigen
    Did you click on "Configure" yet?
    Thanks, i was just trying that after writing the last answer, sorry

    After fixing the systems check, the current problem is this message:
    Code:
    ERROR 500 Unknown installation status
    Some files were found on your server but no known Contao version could be detected.
    You must either manually repair your application or remove the following files and folders to install Contao:
    
    - index.html
    - webalizer
    See also the attached screenshot:
    contao.png
    The thing is, the ObenBasedir option is deactivated in froxlor and the contao file is in a 'web' subdirectory. I don't get where in the installation/configuration it escaped that directory and complains about the parent directory's content (which should be none of it's business?)
    any idea, how i can force contao to stay within that web subdirectory? Or what i do have to change on the php configuration or ... whereever, to get one step further?

    Thanks again

  8. #8
    Wandelndes Contao-Lexikon Avatar von tab
    Registriert seit
    22.10.2013.
    Beiträge
    10.076
    Contao-Projekt unterstützen

    Support Contao

    Standard

    The parent directory is the place where the Contao system will get installed, so this should be reserved for your Contao installation. So It's a good idea to create the empty web directory within an empty subdirectory of your user's webspace. E.g. /var/customers/webs/myuser/myContaoProject/web. That way, you can still have other projects in parallel, residing e.g. in /var/customers/webs/myuser/myOtherProject or /var/customers/webs/myuser/myOtherContaoProject.

  9. #9
    Contao-Nutzer
    Registriert seit
    20.05.2019.
    Beiträge
    6

    Standard

    Zitat Zitat von tab Beitrag anzeigen
    The parent directory is the place where the Contao system will get installed, so this should be reserved for your Contao installation. So It's a good idea to create the empty web directory within an empty subdirectory of your user's webspace. E.g. /var/customers/webs/myuser/myContaoProject/web. That way, you can still have other projects in parallel, residing e.g. in /var/customers/webs/myuser/myOtherProject or /var/customers/webs/myuser/myOtherContaoProject.
    Now that's an interesting fact, i didn't get that anywhere. Thank you.
    Anyway, after the cms was successfully downloaded, i can still access the contao manager, but i cannot access the backend under /contao/install:
    Code:
    The requested URL /contao/install was not found on this server.
    same for /contao:
    Code:
    The requested URL /contao was not found on this server.
    So how can i access the backend now?
    The folder structure is as shown in the attached screenshots:
    cms-web.png
    cms-web-assets.png
    The contao manager php in the /cms/web subfolder was found correctly by accessing the website as described in the first post.

    (I also still have to figure out how to align the access rights of the froxlor created user and www-data. But that's a different story. )

  10. #10
    Administrator Avatar von xchs
    Registriert seit
    19.06.2009.
    Beiträge
    14.557
    User beschenken
    Wunschliste
    Contao-Projekt unterstützen

    Support Contao

    Standard

    What does this folder icon with the question mark mean? Are these folders symlinked somewhere?
    Contao Community Administrator

    [Unterstützungsmöglichkeiten]

  11. #11
    Contao-Nutzer
    Registriert seit
    20.05.2019.
    Beiträge
    6

    Standard

    Zitat Zitat von xchs Beitrag anzeigen
    What does this folder icon with the question mark mean? Are these folders symlinked somewhere?
    No, they are jsut not opened in filezilla. So: meaningless.

    I just searched through the directories, there is no install, install.php or install* file in a contao subfolder.

  12. #12
    Administrator Avatar von xchs
    Registriert seit
    19.06.2009.
    Beiträge
    14.557
    User beschenken
    Wunschliste
    Contao-Projekt unterstützen

    Support Contao

    Standard

    contao/install (Contao install tool) and contao/login (Contao back end) are so called routes not physical paths or files.
    Contao Community Administrator

    [Unterstützungsmöglichkeiten]

  13. #13
    Community-Moderator
    Wandelndes Contao-Lexikon
    Avatar von Spooky
    Registriert seit
    12.04.2012.
    Ort
    Scotland
    Beiträge
    34.063
    Partner-ID
    10107

    Standard

    What kind of webserver are you using? If you are using Apache, you need to make sure that .htaccess files are processed.

  14. #14
    Wandelndes Contao-Lexikon Avatar von tab
    Registriert seit
    22.10.2013.
    Beiträge
    10.076
    Contao-Projekt unterstützen

    Support Contao

    Standard

    What about mod_rewrite? Available or not? If not, try if you can access the Install-Tool via http://yourdomain.tld/app.php/contao/install. If you don't have mod_rewrite active you need to include app.php in the URL.

Aktive Benutzer

Aktive Benutzer

Aktive Benutzer in diesem Thema: 1 (Registrierte Benutzer: 0, Gäste: 1)

Lesezeichen

Lesezeichen

Berechtigungen

  • Neue Themen erstellen: Nein
  • Themen beantworten: Nein
  • Anhänge hochladen: Nein
  • Beiträge bearbeiten: Nein
  •