Wrong Server Path in Repository Instance Creation

Wrong Server Path in Repository Instance Creation

by Antonis L. -
Number of replies: 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?

Average of ratings: -
In reply to Antonis L.

Re: Wrong Server Path in Repository Instance Creation

by Ken Task -
Picture of 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


In reply to Ken Task

Re: Wrong Server Path in Repository Instance Creation

by 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
In reply to Antonis L.

Re: Wrong Server Path in Repository Instance Creation

by Visvanath Ratnaweera -
Picture of Particularly helpful Moodlers Picture of 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.
In reply to Antonis L.

Re: Wrong Server Path in Repository Instance Creation

by Howard Miller -
Picture of Core developers Picture of Documentation writers Picture of Particularly helpful Moodlers Picture of Peer reviewers Picture of 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.
In reply to Howard Miller

Re: Wrong Server Path in Repository Instance Creation

by 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
In reply to Antonis L.

Re: Wrong Server Path in Repository Instance Creation

by 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 smile
Sorry again
In reply to Howard Miller

Re: Wrong Server Path in Repository Instance Creation

by Ken Task -
Picture of 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?! smile

'SoS', Ken


Average of ratings: Useful (1)