Uploaded image for project: 'Moodle'
  1. Moodle
  2. MDL-36963

Automatic updates deployer needs to check directory permisisons too

XMLWordPrintable

    • Icon: Bug Bug
    • Resolution: Fixed
    • Icon: Critical Critical
    • 2.4.1
    • 2.4
    • Administration
    • MOODLE_24_STABLE
    • MOODLE_24_STABLE
    • Hide

      Testing difficulty: HARD (requires shell access to the server and directory permission modifications)

      1. Prepare a 2.4 site with auto updates deployment enabled.
      2. Install a non-recent version of an add-on from the Plugins directory (so that it can be updated automatically)
      3. Set the permissions at the server so that: (a) the web server process has write access to the plugin folder and all its content (e.g. /mod/foobar) but (b) the web server process does not have write access to the parent folder (e.g. /mod in this case).
      4. TEST: Make sure that the plugin is updatable via the admin interface
      Show
      Testing difficulty: HARD (requires shell access to the server and directory permission modifications) Prepare a 2.4 site with auto updates deployment enabled. Install a non-recent version of an add-on from the Plugins directory (so that it can be updated automatically) Set the permissions at the server so that: (a) the web server process has write access to the plugin folder and all its content (e.g. /mod/foobar) but (b) the web server process does not have write access to the parent folder (e.g. /mod in this case). TEST: Make sure that the plugin is updatable via the admin interface

      While testing MDL-36903, I ended up with the following exception:

      Moodle deployment utility had a trouble with your request. See the docs page and the debugging information for more details.
       
      exception 'backup_folder_exception' with message 'Unable to backup the current version of the plugin (moving failed)' in mdeploy.php:755
      Stack trace:
      #0 mdeploy.php(1326): worker->execute()
      #1 {main}
      

      This seemed to be caused by:
      1/ web-server write permissions on the plugin directory
      2/ non-write permissions on the containing directory of the plugin

      I eneded with up with:

      • An empty course/format/topcol directory
      • An archived course/format/topcol directory

            mudrd8mz David Mudrák (@mudrd8mz)
            poltawski Dan Poltawski
            Dan Poltawski Dan Poltawski
            Dan Poltawski Dan Poltawski
            Votes:
            0 Vote for this issue
            Watchers:
            2 Start watching this issue

              Created:
              Updated:
              Resolved:

                Error rendering 'clockify-timesheets-time-tracking-reports:timer-sidebar'. Please contact your Jira administrators.