Uploaded image for project: '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


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


      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.

        Gliffy Diagrams



            gerry Gerard Caulfield created issue -
            gerry Gerard Caulfield made changes -
            Field Original Value New Value
            Priority Minor [ 4 ] Trivial [ 5 ]
            salvetore Michael de Raadt made changes -
            Fix Version/s STABLE backlog [ 10463 ]
            Labels triaged
            salvetore Michael de Raadt made changes -
            Component/s Installation [ 10069 ]
            Component/s Unknown [ 10120 ]
            salvetore Michael de Raadt made changes -
            Priority Trivial [ 5 ] Minor [ 4 ]
            Assignee Michael de Raadt [ salvetore ] moodle.com [ moodle.com ]
            salvetore Michael de Raadt made changes -
            Status Open [ 1 ] Closed [ 6 ]
            Assignee moodle.com [ moodle.com ]
            Resolution Won't Fix [ 2 ]
            Fix Version/s STABLE backlog [ 10463 ]


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


                • Created: