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

Automatic updates deployer needs to check directory permisisons too

    Details

    • Type: Bug
    • Status: Closed
    • Priority: Critical
    • Resolution: Fixed
    • Affects Version/s: 2.4
    • Fix Version/s: 2.4.1
    • Component/s: Administration
    • Labels:
    • Testing Instructions:
      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
    • Affected Branches:
      MOODLE_24_STABLE
    • Fixed Branches:
      MOODLE_24_STABLE
    • Pull from Repository:

      Description

      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

        Gliffy Diagrams

          Attachments

            Issue Links

              Activity

                People

                • Votes:
                  0 Vote for this issue
                  Watchers:
                  2 Start watching this issue

                  Dates

                  • Created:
                    Updated:
                    Resolved:
                    Fix Release Date:
                    14/Jan/13