moodledata folder web server write access problem

moodledata folder web server write access problem

by Ahmed Saber -
Number of replies: 18

we have moodle worked perfectly  a 1 year ago,

then we  decide to buy new VPS with this Environment

Linux centos

php 5.1.6

the problem is after uploading moodle files to

**/**/**/httpdocs/moodle

and upload the moodledata folder to this distnation

**/**/**/moodledata

& adjust settings in config.php file to this paths

an error message display when browes the moodle

ERROR: You need to create the directory /**/**/**/moodledata/ with web server write access

can anyone help

Average of ratings: -
In reply to Ahmed Saber

Re: moodledata folder web server write access problem

by Ahmed Saber -

| moodle version 1.9.6+

In reply to Ahmed Saber

Re: moodledata folder web server write access problem

by Visvanath Ratnaweera -
Picture of Particularly helpful Moodlers Picture of Translators
Did you notice the other paralled discussion http://moodle.org/mod/forum/discuss.php?d=163740 ?
In reply to Visvanath Ratnaweera

Re: moodledata folder web server write access problem

by Ahmed Saber -

the server have a complete install of all software: apache, mysql by the provide,

 

if you can provide me a further help to avoid this error ?

In reply to Ahmed Saber

Re: moodledata folder web server write access problem

by Howard Miller -
Picture of Core developers Picture of Documentation writers Picture of Particularly helpful Moodlers Picture of Peer reviewers Picture of Plugin developers

$ chmod -R 0777 /path/to/your/moodledata


As root smile
In reply to Howard Miller

Re: moodledata folder web server write access problem

by Ahmed Saber -

i do this step but no changes made & same error appear

In reply to Ahmed Saber

Re: moodledata folder web server write access problem

by Howard Miller -
Picture of Core developers Picture of Documentation writers Picture of Particularly helpful Moodlers Picture of Peer reviewers Picture of Plugin developers
Is there any possibility that your PHP is set to 'Safe Mode'?
In reply to Howard Miller

Re: moodledata folder web server write access problem

by Ahmed Saber -

you get an important point, safe_mode was turned on

i changed it Off then restart apache, but Unfortunately same error still appear

In reply to Ahmed Saber

Re: moodledata folder web server write access problem

by Ahmed Saber -

seem to be problem were solved.

 

while i logged in plesk, found this option

php support run as (appache module) & change it to fast cgi application

and the error disappear. but till now i don't know the difference between them & why this error was appearing with apache module

In reply to Ahmed Saber

Re: moodledata folder web server write access problem

by Ahmed Saber -

please, can anyone tell me more about fastcgi & apache module, what is best choice to run moodle faster, secure?

In reply to Ahmed Saber

Re: moodledata folder web server write access problem

by Richard Siddall -

Which user is the directory /**/**/**/moodledata/ owned by? On CentOS 5 it should be owned by apache.

In reply to Richard Siddall

Re: moodledata folder web server write access problem

by Ahmed Saber -

folder owned by this user : psacln

In reply to Ahmed Saber

Re: moodledata folder web server write access problem

by Ahmed Saber -

actually i need to run php as apache module, as i found after do some serches that apache module run it faster.

 

what setting i need to change in order to that

In reply to Ahmed Saber

Re: moodledata folder web server write access problem

by Richard Siddall -

In Plesk 9 that's in the domain's "web hosting setup" screen, in the "services" section.  There's a drop-down list box just to the right of the checkbox where you turn on PHP for the domain.

I think you can also set it from the command line with something like:

/usr/local/psa/bin/domain --update <domain_name> -php_handler_type module

In reply to Ahmed Saber

Re: moodledata folder web server write access problem

by Richard Siddall -

Try running

chown -R apache.apache

on /**/**/**/moodledata/

In reply to Richard Siddall

Re: moodledata folder web server write access problem

by Ahmed Saber -

returning to same error after changing the moodledata owner apache.apache & mod 777 & php running as apache module

ERROR: You need to create the directory /**/**/**/**/moodledata with web server write access

please i need a help urgently

In reply to Ahmed Saber

Re: moodledata folder web server write access problem

by Ahmed Saber -

final soultion i don't try,putting the moodledata in this directory

**/**/**/**/httpdocs/moodledata

and the moodle folder files in this directory

**/**/**/**/httpdocs/moodle

adjust the new setting in the config.php file

no errors appear, is that safe & if i can face any problems in the future when running exams or any other activity in moodle

the exams will start in the next 4 days, need suggestions, help, opinon, or just say hello smile

In reply to Ahmed Saber

Re: moodledata folder web server write access problem

by Ahmed Saber -

the new problem is that i can't login to the moodle

In reply to Ahmed Saber

Re: moodledata folder web server write access problem

by Chad Outten -

**/**/**/**/httpdocs/moodledata

and the moodle folder files in this directory

is that safe?

---

No this is not secure. 'moodledata' directory should be located outside the 'httpdocs' directory. get your host to check permissioning on this directory for you.

More info @

http://docs.moodle.org/en/Installing_Moodle#Create_the_data_directory

http://docs.moodle.org/en/Creating_Moodle_site_data_directory