Unable to create session folder

Unable to create session folder

by Liz Campbell -
Number of replies: 3

Hi

Just taken the brave step of upgrading my Moodle installation. Everything went well, upgraded the database etc BUT I get this error message

Warning: mkdir(/home/eakoorg/public_html/moodle/moodledata/sessions): Permission denied in /home/eakoorg/public_html/moodle/lib/moodlelib.php on line 1418

ERROR: Could not find or create a directory (/home/eakoorg/public_html/moodle/moodledata/sessions)

I am unable to login under any user name but otherwise everything seems OK.

Any suggestions?

Average of ratings: -
In reply to Liz Campbell

Re: Unable to create session folder

by Herbert Keijers -
Hi Liz,
The "new" Moodle stores sessions in moodledata/sessions whereas older one's used another dir (mostly the /tmp directory).
This means that the sessions dir inside moodledata must be writable for the user your webserver is running.
Can you check the permissions on the sessions folder inside moodledata ?

In reply to Herbert Keijers

Re: Unable to create session folder

by Tim Wilson -
Herbert,

I'm getting the same errors on my Gentoo Linux system (Apache2, mod_php, MySQL). The default Web docs are in /var/www/localhost/htdocs and I created a separate folder at /var/www/localhost/uploads for Moodle to store uploaded files and session data. I set the owner of the uploads folder to the 'apache' user and set the permissions to 660. No luck. Moodle is still reporting that it doesn't have permission to mkdir the 'session' folder inside 'uploads'. I tried creating the 'session' folder manually and setting its permissions, but that didn't work either.

Any ideas?

-Tim
In reply to Tim Wilson

Re: Unable to create session folder

by Herbert Keijers -
Hi Tim,
If the "apache user" owns the uploads map, you should chmod to 7-- otherwise the "apache user" is excluded from lookin into the directory and can not see the sessions map inside.

If for some reason you want to keep 66- as permissions, make uploads youruser/yourgroup (not apache) and change to permissions 661
This way the webserver can look into uploads and finds the sessions folder owned by him.

Hope this helps