Ergebnis 1 bis 3 von 3

Thema: Installationsprobleme Contao 4.13 - Permission Denied

  1. #1
    Contao-Nutzer Avatar von snarosy
    Registriert seit
    27.04.2012.
    Beiträge
    148

    Standard Installationsprobleme Contao 4.13 - Permission Denied

    Hallo,
    versuche gerade die aktuelle Contao 4.13. mittels Contao Manager zu installieren.
    Bekomme dabei folgenden Fehler:
    Code:
    > ...
    > @php vendor/bin/contao-setup
    
     [INFO] An APP_SECRET was generated and written to your .env.local file.        
    
     [INFO] An empty .env file was created.                                         
    
    14:31:04 CRITICAL  [console] Error thrown while running command "contao:install-web-dir public --env=prod --no-ansi". Message: "Failed to copy "/var/www/wopfinger/betonbloxx/vendor/contao/manager-bundle/src/Command/../Resources/skeleton/public/.htaccess" to "/var/www/wopfinger/betonbloxx/public/.htaccess" because target file could not be opened for writing: fopen(/var/www/wopfinger/betonbloxx/public/.htaccess): Failed to open stream: Permission denied" ["exception" => Symfony\Component\Filesystem\Exception\IOException { …},"command" => "contao:install-web-dir public --env=prod --no-ansi","message" => "Failed to copy "/var/www/wopfinger/betonbloxx/vendor/contao/manager-bundle/src/Command/../Resources/skeleton/public/.htaccess" to "/var/www/wopfinger/betonbloxx/public/.htaccess" because target file could not be opened for writing: fopen(/var/www/wopfinger/betonbloxx/public/.htaccess): Failed to open stream: Permission denied"]
    
    In Filesystem.php line 59:
                                                                                   
      Failed to copy "/var/www/wopfinger/betonbloxx/vendor/contao/manager-bundle/  
      src/Command/../Resources/skeleton/public/.htaccess" to "/var/www/wopfinger/  
      betonbloxx/public/.htaccess" because target file could not be opened for wr  
      iting: fopen(/var/www/wopfinger/betonbloxx/public/.htaccess): Failed to ope  
      n stream: Permission denied                                                  
                                                                                   
    
    contao:install-web-dir []
    
    14:31:04 CRITICAL  [console] An error occurred while using the console. Message: "An error occurred while executing the "/usr/bin/php8.1 -dmemory_limit=-1 /var/www/wopfinger/betonbloxx/vendor/contao/manager-bundle/bin/contao-console contao:install-web-dir public --env=prod --no-ansi" command: 14:31:04 CRITICAL  [console] Error thrown while running command "contao:install-web-dir public --env=prod --no-ansi". Message: "Failed to copy "/var/www/wopfinger/betonbloxx/vendor/contao/manager-bundle/src/Command/../Resources/skeleton/public/.htaccess" to "/var/www/wopfinger/betonbloxx/public/.htaccess" because target file could not be opened for writing: fopen(/var/www/wopfinger/betonbloxx/public/.htaccess): Failed to open stream: Permission denied" ["exception" => Symfony\Component\Filesystem\Exception\IOException { …},"command" => "contao:install-web-dir public --env=prod --no-ansi","message" => "Failed to copy "/var/www/wopfinger/betonbloxx/vendor/contao/manager-bundle/src/Command/../Resources/skeleton/public/.htaccess" to "/var/www/wopfinger/betonbloxx/public/.htaccess" because target file could not be opened for writing: fopen(/var/www/wopfinger/betonbloxx/public/.htaccess): Failed to open stream: Permission denied"]
    
    In Filesystem.php line 59:
                                                                                   
      Failed to copy "/var/www/wopfinger/betonbloxx/vendor/contao/manager-bundle/  
      src/Command/../Resources/skeleton/public/.htaccess" to "/var/www/wopfinger/  
      betonbloxx/public/.htaccess" because target file could not be opened for wr  
      iting: fopen(/var/www/wopfinger/betonbloxx/public/.htaccess): Failed to ope  
      n stream: Permission denied                                                  
                                                                                   
    
    contao:install-web-dir []
    
    " ["exception" => RuntimeException { …},"message" => """  An error occurred while executing the "/usr/bin/php8.1 -dmemory_limit=-1 /var/www/wopfinger/betonbloxx/vendor/contao/manager-bundle/bin/contao-console contao:install-web-dir public --env=prod --no-ansi" command: 14:31:04 CRITICAL  [console] Error thrown while running command "contao:install-web-dir public --env=prod --no-ansi". Message: "Failed to copy "/var/www/wopfinger/betonbloxx/vendor/contao/manager-bundle/src/Command/../Resources/skeleton/public/.htaccess" to "/var/www/wopfinger/betonbloxx/public/.htaccess" because target file could not be opened for writing: fopen(/var/www/wopfinger/betonbloxx/public/.htaccess): Failed to open stream: Permission denied" ["exception" => Symfony\Component\Filesystem\Exception\IOException { …},"command" => "contao:install-web-dir public --env=prod --no-ansi","message" => "Failed to copy "/var/www/wopfinger/betonbloxx/vendor/contao/manager-bundle/src/Command/../Resources/skeleton/public/.htaccess" to "/var/www/wopfinger/betonbloxx/public/.htaccess" because target file could not be opened for writing: fopen(/var/www/wopfinger/betonbloxx/public/.htaccess): Failed to open stream: Permission denied"]\n  \n  In Filesystem.php line 59:\n                                                                                 \n    Failed to copy "/var/www/wopfinger/betonbloxx/vendor/contao/manager-bundle/  \n    src/Command/../Resources/skeleton/public/.htaccess" to "/var/www/wopfinger/  \n    betonbloxx/public/.htaccess" because target file could not be opened for wr  \n    iting: fopen(/var/www/wopfinger/betonbloxx/public/.htaccess): Failed to ope  \n    n stream: Permission denied                                                  \n                                                                                 \n  \n  contao:install-web-dir []\n  \n  """]
    
    In ContaoSetupCommand.php line 152:
                                                                                   
      An error occurred while executing the "/usr/bin/php8.1 -dmemory_limit=-1 /v  
      ar/www/wopfinger/betonbloxx/vendor/contao/manager-bundle/bin/contao-console  
       contao:install-web-dir public --env=prod --no-ansi" command: 14:31:04 CRIT  
      ICAL  [console] Error thrown while running command "contao:install-web-dir   
      public --env=prod --no-ansi". Message: "Failed to copy "/var/www/wopfinger/  
      betonbloxx/vendor/contao/manager-bundle/src/Command/../Resources/skeleton/p  
      ublic/.htaccess" to "/var/www/wopfinger/betonbloxx/public/.htaccess" becaus  
      e target file could not be opened for writing: fopen(/var/www/wopfinger/bet  
      onbloxx/public/.htaccess): Failed to open stream: Permission denied" ["exce  
      ption" => Symfony\Component\Filesystem\Exception\IOException { …},"command"  
       => "contao:install-web-dir public --env=prod --no-ansi","message" => "Fail  
      ed to copy "/var/www/wopfinger/betonbloxx/vendor/contao/manager-bundle/src/  
      Command/../Resources/skeleton/public/.htaccess" to "/var/www/wopfinger/beto  
      nbloxx/public/.htaccess" because target file could not be opened for writin  
      g: fopen(/var/www/wopfinger/betonbloxx/public/.htaccess): Failed to open st  
      ream: Permission denied"]                                                    
                                                                                   
      In Filesystem.php line 59:                                                   
                                                                                   
                                                                                   
        Failed to copy "/var/www/wopfinger/betonbloxx/vendor/contao/manager-bundl  
      e/                                                                           
        src/Command/../Resources/skeleton/public/.htaccess" to "/var/www/wopfinge  
      r/                                                                           
        betonbloxx/public/.htaccess" because target file could not be opened for   
      wr                                                                           
        iting: fopen(/var/www/wopfinger/betonbloxx/public/.htaccess): Failed to o  
      pe                                                                           
        n stream: Permission denied                                                
                                                                                   
                                                                                   
                                                                                   
                                                                                   
      contao:install-web-dir []                                            
                                                                                   
    
    contao:setup
    
    Script @php vendor/bin/contao-setup handling the post-install-cmd event returned with error code 1
    
    # Process terminated with exit code 1
    # Result: General error
    Ich finde da leider nichts vergleichbares, kann mir jemand einen Tipp geben?
    Vermutlich Nutzerrechte?
    lg

  2. #2
    Contao-Fan
    Registriert seit
    24.02.2021.
    Beiträge
    455

    Standard

    Falls du SSH Zugriff hast, navigiere in die Contao Root Installation (über cd (change directory)) und nutze:

    Code:
    chmod 0755 public
    Das public Verzeichnis sollte 755 besitzen / die Rechte sollten auf rwxr-xr-x stehen

    User: Read - Write - Execute
    Group: Read - ... - Execute
    Other: Read - ... - Exexute

    Wenn das Public-Verzeichnis nicht auf Execute für Group und Others steht, können die Files nicht gelesen werden. Danach wieder versuchen.
    Meine Vermutung ist, dass die Rechte sehr wahrscheinlich auf 644 gesetzt sind, wenn du den public folder bei deinem Hoster via SFTP / FTP hochgeladen hast.

    Bei Problemen gerne antworten mit weiteren Logs.

    MfG zoglo

    Edit:
    Kann es sein, dass der Manager hier keinen Zugriff hat? Notfalls den Hoster fragen:
    Code:
      Failed to copy "/var/www/wopfinger/betonbloxx/vendor/contao/manager-bundle/  
      src/Command/../Resources/skeleton/public/.htaccess" to "/var/www/wopfinger/  
      betonbloxx/public/.htaccess" because target file could not be opened for wr  
      iting
    Geändert von zoglo (19.06.2023 um 19:02 Uhr)

  3. #3
    Contao-Nutzer Avatar von snarosy
    Registriert seit
    27.04.2012.
    Beiträge
    148

    Standard

    Danke für die Unterstützung, es hatte etwas mit den Einstellungen des PHP-Socket im Zusammenhang mit dem User zu tun.
    Mein Provider hat das umgestellt, dann hats funktioniert.

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
  •