Impossible to install plugins

Impossible to install plugins

by Arnaud Forster -
Number of replies: 7

Hello all,

I just installed a new Moodle for your school (3.9.1+ (Build: 20200903)) but I have problems to install plugins.

According to the docs I found on the site, I changed the following config into the /lib/setup.php :

$CFG->directorypermissions = 02750;


Then I tried to change security of the folder /mod with the 777 ...

This worked a few hours (even I dont like have a security with 7777)  but now and again, I can't install a new plugin ; I always get the following error :

Should I change the whole /hml/moodle/ security ?

Installer le plugin à partir d'un fichier ZIP

Validation de block_microsoft ... Erreur
  [Erreur] Vérification des droits d'accès en écriture [/var/www/html/moodle/blocks] 

 Installation interrompue en raison de l'échec de la validation

Or another try with another module :
[Erreur] Vérification des droits d'accès en écriture [/var/www/html/moodle/question/type] 

Should I change the whole /html/moodle/* security ? or is there another way to solve that ?
Thanks to all for your help

Kind Regards
Arnaud
Average of ratings: -
In reply to Arnaud Forster

Re: Impossible to install plugins

by Arnaud Forster -
Ok, according to the doc and my installation (Apache web server) , it seems my Apache web process doesnt have any acess into these directories :
/path/to/moodle/theme/ - themes
/path/to/moodle/mod/ - activity modules and resources
/path/to/moodle/blocks/ - sidebar blocks
/path/to/moodle/question/type/ - question types
/path/to/moodle/course/format/ - course formats
/path/to/moodle/admin/report/ - admin reports

do you think it is a good idea to change the group of these directories from root to apache ? I let root being the owner.
This could solve my problem ,,,,
thanks to all for your help
BestRegares
Anaud
In reply to Arnaud Forster

Re: Impossible to install plugins

by Ken Task -
Picture of Particularly helpful Moodlers
All the directories you've mentioned are locations of 'plugins'. So to install via web interface then the web service user would need write access to directories recursively.

Or, one could learn how to install/update plugins via command line thus (supposedly) keeping code directory 'secure'.

'SoS', Ken
In reply to Ken Task

Re: Impossible to install plugins

by Arnaud Forster -
Hello Ken,
thanks for your answer ; I'll keep that in mind smile
The only problem I've is the following : I'm responsible for the Linux OS (Centos). As the server is for our school, 2 teachers are responsible for Moodle, that means installing the plugins, too. But they've no idea and no access to the command line ; that's why they should be able to install blugins via the web interface.
According to what you wrote, I'll try to give some write access to the web service for the plugins folders...
thanks very much for your help
In reply to Arnaud Forster

Re: Impossible to install plugins

by Ken Task -
Picture of Particularly helpful Moodlers
For a school, that is typical 'divide and conquer' organization. You are the true server admin (CentOS). Staff at school, in order to install plugins without consulting with you, means they would need admin level access in the moodle.

Advise those persons be warned that it's a good idea to investigate/research plugins ... must be compatible with version of Moodle. Some plugins have dependencies (other plugins that must also be installed for the main plugin to function) ... and that themes are plugins as well. So while you might set permissions/ownerships such that those persons have the capability to install, if there are issues with those installs, that comes back to you to resolve.

Might be a good idea for those persons to keep you in the loop when it comes to what they want to install. Best if the code and DB be backed up prior to installs of plugins ... and those are two areas that are not available in the Moodle Admin UX ... here again ... that's your part.

I advise this as I've had plenty of experience in that role of true operating system admin.

'SoS', Ken
In reply to Ken Task

Re: Impossible to install plugins

by Arnaud Forster -
You're absolutely right and this should be like that smile
The only thing here in my case is that I'm new in the school and the process is the following : they have a test machine at a provider where they dont have to take care of the os.
On that machine, they are testing the plugins and when everything's fine they install that on the production system .
.. I wanna talk with them to see if we can change the way they use ...
Thanks Ken
In reply to Arnaud Forster

Re: Impossible to install plugins

by Ken Task -
Picture of Particularly helpful Moodlers

Good that there is a sandbox for testing.  Here's the issue with sandboxes to which you don't have access ... those using never clean it up ... ie, they don't seem to remove plugins that they installed and then for some reason didn't work or didn't work as expected, etc.   So sandbox has a different combo of plugins ... anyone of which could cause a conflict with whatever they are tinkering with.

Are sandbox and production same OS and same exact version of Moodle?  same environment?

Got a situation like that ... cept their internal sandbox is internal only ... no outside access.   So for them to play they have to be connected to the internal network.   The only access I have is via CLI via a ssh hop.

Makes 'work' interesting!   But, that's why you get paid the big bucks, right? :\

You do want to empower school staff, but do so where it doesn't create more additional work for you ... or them.

'SoS', Ken

In reply to Ken Task

Re: Impossible to install plugins

by Arnaud Forster -
Hi Ken smile
As you were 100% right, I had a talk with these teachers and finally, they agreed with that. So they're going to test the plugins in their sandbox and when they want on, I'll have to install it on the prod system ;)
Thanks very much for your advices smile