Wrong Server Path in Repository Instance Creation

Wrong Server Path in Repository Instance Creation

av Antonis L. -
Antall svar: 7

Hi all, I was wondering if anyone could help.

While trying to create my first repository instance, I get this warning below the name field 

"You need to create at least one folder inside the /home/customer/www/moodle.XXemacXXX.gr/omixofqj/repository/ directory so you can select it here."

and no dropdown list is shown. 

The problem is that the whole indicated path is wrong. The site is in a plesk installation, so all vhosts are in 

/var/www/vhosts/ 

and not /home/customer etc.  The /home directory is just empty. tried to recreate the path to see what happens to the error, but no luck.

I created the repository folder in my moodledata directory, and a test subfolder, but the problem remains.

Data root in config.php is correct
$CFG->dataroot  = '/var/www/vhosts/XXemacXXX.gr/moodle.XXemacXXXX.gr/moodledata';

No instance is created.. Any ideas?

Gjennomsnittlig vurdering: -
Som svar til Antonis L.

Re: Wrong Server Path in Repository Instance Creation

av Ken Task -
Bilde av Particularly helpful Moodlers

Plesk has openbase directory restriction in place.  You migh need to add the path to this repository.

When attempting to setup a file system repository, moodle will not/cannot create a directory in moodledata/repository/ ... must be done via panel or command line.

Once that directory is in place, set up in the Moodle admin will show it ... if openbase directory isn't restricting.

Don't host/use Plesk ... above based upon attempting to assist one time ... some time ago ... and that's what I re-collect ... but, maybe my synapses aren't working! :|

'SoS', Ken


Som svar til Ken Task

Re: Wrong Server Path in Repository Instance Creation

av Antonis L. -
Thank you for the reply!
The directory is setup in moodledata/repository/ but it doesn't show up..
I will see about the openbase in Plesk
What strikes me strange is where does moodle find that absolute path it is showing on the error, the /home/customer/www/moodle.XXemacXXX.gr/omixofqj/repository/   which doesn't exist anywhere
Som svar til Antonis L.

Re: Wrong Server Path in Repository Instance Creation

av Visvanath Ratnaweera -
Bilde av Particularly helpful Moodlers Bilde av Translators
If your $CFG->dataroot is /var/www/vhosts/XXemacXXX.gr/moodle.XXemacXXXX.gr/moodledata, then the Moodle file system repository will be /var/www/vhosts/XXemacXXX.gr/moodle.XXemacXXXX.gr/moodledata/repository. See https://docs.moodle.org/en/File_system_repository#Creating_folders_for_your_file_system_repositories.

Moodle finds it appending /repository to $CFG->dataroot.
Som svar til Antonis L.

Re: Wrong Server Path in Repository Instance Creation

av Howard Miller -
Bilde av Core developers Bilde av Documentation writers Bilde av Particularly helpful Moodlers Bilde av Peer reviewers Bilde av Plugin developers
I even checked the code.... the directory it is checking for (and complaining doesn't exist) is simply created by...

$CFG->dataroot . '/repository/';

Which would imply that $CFG->dataroot is not as stated. Which is odd.

I'm not sure why Ken thinks this is anything to do with open_basedir but I know nothing whatever about Plesk.
Som svar til Howard Miller

Re: Wrong Server Path in Repository Instance Creation

av Antonis L. -
Yes I looked at the code as well, seeing the $CFG->dataroot . '/repository/';
the dataroot is as stated
$CFG->dataroot = '/var/www/vhosts/XXemacXXX.gr/moodle.XXemacXXXX.gr/moodledata';
nothing else in moodle has an error, and I guess that many things would have be broken if the dataroot wasn;t correctly defined
I will try to hard code the correct directory to see what happens
Som svar til Antonis L.

Re: Wrong Server Path in Repository Instance Creation

av Antonis L. -
Guys sorry for the trouble.. Turns out the hosting was moved to another server and I was looking the wrong FTP..
If you think, you may delete this Thread, as I think doesn't provide any help to others smiler
Sorry again
Som svar til Howard Miller

Re: Wrong Server Path in Repository Instance Creation

av Ken Task -
Bilde av Particularly helpful Moodlers

Plesk is the most restrictive hosting panel when it comes to location of moodledata.  If one attempts to follow Moodle doc recommendations about location of moodledata,  one will run into issues.

https://support.plesk.com/hc/en-us/articles/360006170513-How-to-add-custom-or-additional-path-to-the-open-basedir-option-for-Plesk-domain-

But, we now know it was wrong server?! smiler

'SoS', Ken


Gjennomsnittlig vurdering:Useful (1)