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

$CFG->directorypermissions (or rather $CFG->umaskpermissions) sets the permissions of PHP.ini log created with error_log directive

XMLWordPrintable

    • Icon: Bug Bug
    • Resolution: Unresolved
    • Icon: Minor Minor
    • None
    • 4.2.11, 4.1.16, 4.3.10, 4.4.6, 4.5.2
    • Logging
    • None
    • MOODLE_401_STABLE, MOODLE_402_STABLE, MOODLE_403_STABLE, MOODLE_404_STABLE, MOODLE_405_STABLE

      We set $CFG->directorypermissions to 0700 as recommended.

      We had our PHP error reporting logged to httpd logs, but recently switched to a separate PHP error log file.

      Moodle extracts $CFG->umaskpermissions and sets the processes umask right after.

      Setting the umask with umask() overrides PHP's way to create the error log configured with the php.ini directive error_log, which would normally be created with 0644 permissions.

      So basically, if you close up shop of moodledata, you simultaneously prevent the log from being read by "normal" users.

      You should probably store the "regular" umask somewhere, and during logging something you should temporarily revert back to that old umask.

            Unassigned Unassigned
            poggenpohlda Daniel Poggenpohl
            Votes:
            0 Vote for this issue
            Watchers:
            2 Start watching this issue

              Created:
              Updated:

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