Moodle
  1. Moodle
  2. MDL-30750

Changing $CFG-tempdir to a directory that doesn't have the required permissions results in a bug that says that $CFG->dataroot has the wrong permissions

    Details

    • Type: Bug Bug
    • Status: Closed
    • Priority: Minor Minor
    • Resolution: Won't Fix
    • Affects Version/s: 2.2
    • Fix Version/s: None
    • Component/s: Installation
    • Labels:
    • Affected Branches:
      MOODLE_22_STABLE
    • Rank:
      33667

      Description

      As you can see in the screenshot I've changed my $CFG->tempdir to /private/var/www/moodledata/integration/2_3 which www-data does not have write permissions for. However the $CFG->dataroot is set to /home/gerry/Desktop/tempdata/moodledata/dev/MOODLE_22_STABLE which is owned and writeable by www-data. However the debug message tells me that dataroot is the problem, when in fact it's permissions are fine but tempdir isn't.

      chmod o+w /private/var/www/moodledata/integration/2_3 #makes the debug message go away
      chmod o-w /private/var/www/moodledata/integration/2_3; rm -fr /private/var/www/moodledata/integration/2_3/* #brings the error back

      To replicate all you should need to do is set your $CFG->tempdir to a directory that isn't writeable by the user that your page runs under.

        Activity

        Hide
        Michael de Raadt added a comment -

        I had to stare at this for a while before I saw the distinction: tempdir vs dataroot.

        Show
        Michael de Raadt added a comment - I had to stare at this for a while before I saw the distinction: tempdir vs dataroot.
        Hide
        Michael de Raadt added a comment -

        Thanks for reporting this issue.

        We have detected that this issue has been inactive for over a year. It was reported as affecting versions that are no longer supported.

        If you believe that this issue is still relevant to current versions (2.5 and beyond), please comment on the issue. Issues left inactive for a further month will be closed.

        Michael d.

        TW9vZGxlDQo=

        Show
        Michael de Raadt added a comment - Thanks for reporting this issue. We have detected that this issue has been inactive for over a year. It was reported as affecting versions that are no longer supported. If you believe that this issue is still relevant to current versions (2.5 and beyond), please comment on the issue. Issues left inactive for a further month will be closed. Michael d. TW9vZGxlDQo=
        Hide
        Michael de Raadt added a comment -

        I'm closing this issue as it has been inactive for over a year has been recorded as affecting versions that are no longer supported.

        This is being done as part of a bulk annual clean-up of issues.

        If you still believe this is an issue in supported versions, please create a new issue.

        Show
        Michael de Raadt added a comment - I'm closing this issue as it has been inactive for over a year has been recorded as affecting versions that are no longer supported. This is being done as part of a bulk annual clean-up of issues. If you still believe this is an issue in supported versions, please create a new issue.

          People

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

            Dates

            • Created:
              Updated:
              Resolved: