Plugin installation problems

Plugin installation problems

by Diane Soini -
Number of replies: 3

I am having trouble both uninstalling and installing my block plugin in development. I have an install.xml and originally I triggered it through an upgrade. Now I want to uninstall the plugin and install it fresh. I cannot seem to do either thing unless I change the file ownership of install.xml. This does not seem right to me. No other plugin requires the ownership of the file to be owned by the webserver. I can't uninstall the plugin or install it anywhere else. What am I missing?

Average of ratings: -
In reply to Diane Soini

Ang: Plugin installation problems

by Preben Pedersen -
Hi Diane,

If you are doing it from the frontend through the siteadministrationen, then your webserver does need to own to file, in order to delete it. If your webserver doesn't have these rights, then the plugin will install itself again.

Usually i give the webserver ownership of the local folder, and then the plugin folders.

If you don't want to grant the webserver ownership to remove the plugin for you, then you will have to do it yourself on the serverside, and delete the folder of the plugin. This should trigger an update when you then go to siteadministration -> Notifications.
Average of ratings: Useful (1)
In reply to Diane Soini

Re: Plugin installation problems

by David Mudrák -
Picture of Core developers Picture of Documentation writers Picture of Moodle HQ Picture of Particularly helpful Moodlers Picture of Peer reviewers Picture of Plugin developers Picture of Plugins guardians Picture of Testers Picture of Translators

I can't uninstall the plugin or install it anywhere else

How exactly are you trying to uninstall it?

For your information the Moodle Plugin Development Basics course at learn.moodle.org has this topic covered in its "Plugin folder name and contents" section:

Screenshot from the course

Average of ratings: Useful (1)
In reply to David Mudrák

Re: Plugin installation problems

by Diane Soini -
I could not uninstall it with that link because the link would not appear.

I figured out the problem. I used the XMLDB editor to create the file and didn't notice that it creates it with different file permissions than files that are created other ways. In order to add the xml file to my codebase, I couldn't SCP download it from the server unless I changed the ownership and I didn't notice that the permissions of the created file wouldn't allow it to be read by the apache user if I changed its ownership.