Updating Drupal Modules with the Update Manager on Windows IIS: Cannot remove file

While trying to update the editor_file Drupal module with the web interface I encountered the following error:

Cannot remove file /web/modules/editor_file\config\schema\editor_file.schema.yml

After a long search I remembered that I had changed the application pool user in IIS for my website but the corresponding file permissions where apparently not updated. You can set file permissions for the application pool user b:

  • selecting the directory in IIS
  • clicking Edit Permissions
  • going to the tab Security
  • clicking Edit
  • clicking Add...
  • the object name for app pool users is the name of the application pool prefixed by IIS AppPool\ e.g. IIS AppPool\mywebsite
  • I gave Full Control permissions to the module folder and my update procedure worked
Some system notes:
  • Drupal 8.6
  • Windows Server 2012 R2
I'm new to Drupal so if you found a better way let me know.