Can't access site administration settings

Can't access site administration settings

by Jukka Kylliäinen -
Number of replies: 4

Hi,

I don't know which version Moodle is running, because I can't access Site administration settings, error message

"Invalid permissions detected when trying to create a directory. Turn debugging on for further details."

I have turned debugging on with config.php file and it says


Duplicate admin category name: users, courses, grades, competencies, badges, location, language, modules, security, appearance, frontpage, server, mnet, reports, development, unsupported, themes

What I did before this started, is as follows

Deselect execution via command line only and set Cron password for remote access

And also run following commands

https://"domain name"/online/admin/cron.php?password=secret >/dev/null

c:\install\moodle\v1\server\php\php-win.exe -f c:\install\moodle\v1\server\moodle\admin\cli\cron.php




Average of ratings: -
In reply to Jukka Kylliäinen

Re: Can't access site administration settings

by Ken Task -
Picture of Particularly helpful Moodlers

Don't run Windoze myself, but on any platform, the version of the moodle code can be seen in the version.php file located at the root of the moodle code.

The https 'command' you ran (via browser?) shows an /online/ in the url but the paths to the cli of cron.php shows:

c:\install\moodle\v1\server\moodle

Would think the url would be https://yoursite/moodle/ as that is where the moodle code resides?

Whqt was your reasoning in using redirect in a URL?  The > /dev/null?   Don't think browsers do that ... at least I hope they don't!!!

In the debug output, there is an 'unsupported' listed.  Moodle reads directories so it appears something is not moodle code in the 'admin' directory.   Did we try to manually install an addon?

This part ... 'Invalid permissions detected when trying to create a directory' ... all the files/folders in the code directory should have ownerships related to the web service user.

If you can find your web service logs (error) see what that says for more info.

'spirit of sharing', Ken


In reply to Ken Task

Re: Can't access site administration settings

by Jukka Kylliäinen -

I checked the Moodel version from version.php file, see below

"* MOODLE VERSION INFORMATION
 *
 * This file defines the current version of the core Moodle code being used.
 * This is compared against the values stored in the database to determine
 * whether upgrades should be performed (see lib/db/*.php)
 *
 * @package    core
 * @copyright  1999 onwards Martin Dougiamas (http://dougiamas.com)
 * @license    http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later
 */

defined('MOODLE_INTERNAL') || die();

$version  = 2017051500.04;              // 20170515      = branching date YYYYMMDD - do not modify!
                                        //         RR    = release increments - 00 in DEV branches.
                                        //           .XX = incremental changes.

$release  = '3.3+ (Build: 20170608)'; // Human-friendly version name

$branch   = '33';                       // This version's branch.
$maturity = MATURITY_STABLE;             // This version's maturity level."


Server platform is Windows Server 2016 with Apache 2.4.23, PHP 7.0.9 and mysql  Ver 15.1 Distrib 10.1.16-MariaDB, for Win32 (AMD64).

And from Apache/logs folder there is error.log, which is loaded as attachment.





In reply to Jukka Kylliäinen

Re: Can't access site administration settings

by Ken Task -
Picture of Particularly helpful Moodlers

I don't do Windows .... but maybe someone else who does can pickup with this discussion after reading this:

This error is repeated:

[Thu Jun 07 08:01:35.633324 2018] [:error] [pid 6224:tid 1872] [client 10.37.74.250:3996] Default exception handler: Invalid permissions detected when trying to create a directory. Turn debugging on for further details. Debug: [tempdir]/filestorage is not writable, check permissions.

'invalid permissions detected when trying to create a directory. ...... Debug says not writable, check permissions.'

So whatever user the Apache service runs under that user cannot create a directory.

Ownerships and permissions on moodledata must allow the Apache user read and **write** at least.

That's all I know.

Best of Luck!

'spirit of sharing', Ken


In reply to Ken Task

Re: Can't access site administration settings

by Jukka Kylliäinen -

Hi,

I found the reason and you where right. I found few folders where Apache service user haven't needed read and write permissions and also ownership was missing. Correction those, everything is working again.

Thank's a lot.