Sorry for late appearance, last week in University takes priority.
I changed owner of datadir (moodledata) by "chown" command like so:
chown www-data /var/moodledata
By the way, should I also change group of the folder? Right now owner is reported as www-data and group is reported as root.
Still, there error about permissions is the same. Anything else I am missing? On an unrelated note, where should moodledata be? Is it better to store in
/var/moodledata
or
/var/www/moodledata
I'm also attaching error log if it helps.
[16-Dec-2014 16:27:03 Europe/Helsinki] PHP Fatal error: Uncaught exception 'invalid_dataroot_permissions' with message 'Invalid permissions detected in $CFG->dataroot directory, administrator has to fix permissions.' in /var/www/www/moodle/lib/setuplib.php:1278
Stack trace:
#0 /var/www/www/moodle/lib/setuplib.php(1360): make_writable_directory('/var/moodledata...', true)
#1 /var/www/www/moodle/cache/stores/file/lib.php(155): make_cache_directory('cachestore_file...')
#2 /var/www/www/moodle/cache/classes/factory.php(264): cachestore_file->__construct('default_applica...', Array)
#3 /var/www/www/moodle/cache/classes/helper.php(152): cache_factory->create_store_from_config('default_applica...', Array, Object(cache_definition))
#4 /var/www/www/moodle/cache/classes/helper.php(137): cache_helper::initialise_cachestore_instances(Array, Object(cache_definition))
#5 /var/www/www/moodle/cache/classes/factory.php(234): cache_helper::get_cache_stores(Object(cache_definition))
#6 /var/www/www/moodle/cache/classes/factory.php(183): cache_factory->create_cache(Object(cache_defin in /var/www/www/moodle/lib/setuplib.php on line 1278