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

Installing add-ons causes 500 internal server error.

    XMLWordPrintable

    Details

    • Type: Bug
    • Status: Closed
    • Priority: Critical
    • Resolution: Fixed
    • Affects Version/s: 2.5.2, 2.6
    • Fix Version/s: 2.6
    • Component/s: Administration
    • Labels:
    • Testing Instructions:
      Hide

      0/ execute phpunit tests
      1/ set some weird permissions (but still working) on your /mod/ directory (or any other plugin type you like)
      2/ install add-on activity
      3/ verify the permissions of files and dirs of the newly installed plugin directories match mod directory permissions and new files are without the 'x' flag

      Show
      0/ execute phpunit tests 1/ set some weird permissions (but still working) on your /mod/ directory (or any other plugin type you like) 2/ install add-on activity 3/ verify the permissions of files and dirs of the newly installed plugin directories match mod directory permissions and new files are without the 'x' flag
    • Workaround:
      Hide

      Manually changing the permissions recursively to whatever your server requires - such as for folders '755' and files to '644' rectifies the issue.

      Show
      Manually changing the permissions recursively to whatever your server requires - such as for folders '755' and files to '644' rectifies the issue.
    • Affected Branches:
      MOODLE_25_STABLE, MOODLE_26_STABLE
    • Fixed Branches:
      MOODLE_26_STABLE
    • Pull from Repository:
    • Pull Master Branch:
      w44_MDL-42110_m26_addoninstaller
    • Story Points:
      13
    • Sprint:
      BACKEND Sprint 6

      Description

      When installing add-ons using the functionality as described on http://docs.moodle.org/25/en/admin/tool/installaddon/index it is possible that when the files are copied from the 'moodledata' folder to the moodle installation folder the wrong permissions are used thus causing a 500 internal server error on a Unix / Linux operating system when the plugin is used.

      If a plugin is unzipped locally and FTP'd then the issue does not occur.

      After extensive investigation (and from other sources) on: https://moodle.org/mod/forum/discuss.php?d=238274. I have discovered that the folders are being copied with a '777' permission and the files '666' and that manually correcting this recursively for folders to '755' and files to '644' rectifies the issue.

      It might be that there is no actual code fix but rather improved instructions to set the permissions on the 'moodledata' folder as '755' for folders and '644' for files ensuring the owner and group are the same as the web server.

        Attachments

          Issue Links

            Activity

              People

              Assignee:
              skodak Petr Skoda
              Reporter:
              gb2048 Gareth J Barnard
              Integrator:
              Damyon Wiese
              Tester:
              Damyon Wiese
              Participants:
              Component watchers:
              Andrew Nicols, Jun Pataleta, Michael Hawkins, Shamim Rezaie, Simey Lameze
              Votes:
              0 Vote for this issue
              Watchers:
              5 Start watching this issue

                Dates

                Created:
                Updated:
                Resolved:
                Fix Release Date:
                18/Nov/13