Uploaded image for project: 'Blesta Core'
  1. Blesta Core
  2. CORE-2426

Permission issue creating log directory can interrupt migration

    Details

    • Type: Bug
    • Status: Closed
    • Priority: Blocker
    • Resolution: Fixed
    • Affects Version/s: 4.1.0-b1
    • Fix Version/s: 4.1.0-b2
    • Component/s: Staff Interface
    • Labels:
      None

      Description

      If the directory above the document root is not writable, the logs_blesta directory cannot be created, and the migrator fails with an error:

      Instead, it should fail silently and just not create or set the logs directory. I assume that with no log directory set in the settings, Monolog will just not attempt to write the file at all. If it does try to write it, it may write to a bad location or produce an error, need to make sure it does not.

      [2017-07-18 19:58:11] general.ERROR: exception 'UnknownException' with message 'mkdir(): Permission denied' in /var/www/html/blesta/components/upgrades/tasks/upgrade4_1_0_b1.php:248 Stack trace: #0 [internal function]: UnknownException::setErrorHandler(2, 'mkdir(): Permis...', '/var/www/html/b...', 248, Array) #1 /var/www/html/blesta/vendors/monolog/monolog/src/Monolog/ErrorHandler.php(164): call_user_func(Array, 2, 'mkdir(): Permis...', '/var/www/html/b...', 248, Array) #2 [internal function]: Monolog\ErrorHandler->handleError(2, 'mkdir(): Permis...', '/var/www/html/b...', 248, Array) #3 /var/www/html/blesta/components/upgrades/tasks/upgrade4_1_0_b1.php(248): mkdir('/var/www/html/l...', 493) #4 /var/www/html/blesta/components/upgrades/tasks/upgrade4_1_0_b1.php(63): Upgrade4_1_0B1->createLogDirectory() #5 /var/www/html/blesta/components/upgrades/upgrades.php(266): Upgrade4_1_0B1->process('createLogDirect...') #6 /var/www/html/blesta/components/upgrades/upgrades.php(101): Upgrades->processObject(Object(Upgrade4_1_0B1), NULL) #7 /var/www/html/blesta/app/controllers/admin_upgrade.php(108): Upgrades->start('4.0.0-b6', '4.1.0-b1') #8 /var/www/html/blesta/vendors/minphp/bridge/src/Lib/Dispatcher.php(143): AdminUpgrade->process() #9 /var/www/html/blesta/index.php(21): Dispatcher::dispatch('/admin/upgrade/...') #10

      {main}

        Activity

        admin Paul Phillips created issue -
        tyson Tyson Phillips (Inactive) made changes -
        Field Original Value New Value
        Sprint 4.1.0 Sprint 6 [ 43 ]
        tyson Tyson Phillips (Inactive) made changes -
        Rank Ranked higher
        Automated transition triggered when Tyson Phillips (Inactive) created a branch in Stash -
        Status Open [ 1 ] In Progress [ 3 ]
        Automated transition triggered when Tyson Phillips (Inactive) created pull request #300 in Stash -
        Status In Progress [ 3 ] In Review [ 5 ]
        Resolution Fixed [ 1 ]
        Automated transition triggered when Tyson Phillips (Inactive) merged pull request #300 in Stash -
        Status In Review [ 5 ] Closed [ 6 ]

          People

          • Assignee:
            tyson Tyson Phillips (Inactive)
            Reporter:
            admin Paul Phillips
          • Votes:
            0 Vote for this issue
            Watchers:
            1 Start watching this issue

            Dates

            • Created:
              Updated:
              Resolved:
              Fix Release Date:
              7/Aug/17

              Agile