0

I'm running IIS 8 on a virtual machine (Windows Server 2012 Datacenter) in Azure. I have installed WordPress and its dependencies using the Web Platform Installer 4.6

I have trouble when WordPress needs to write files from its admin console. I've added the ftp details to the file C:\inetpub\wwwroot\blog\wp-config.php and that works fine. But whenever WordPress tries to write a file from its management web page, for example to create a child theme or to upload media I got an error (e.g. 'failed to upload due to an error' or 'Target child theme directory cannot be created. This is probably a permission error'.)

I can fix this using EvilDr's idea of adding permissions to the IUSR account. But I am nervous about this since it seems that IUSR and should only have access to precisely what it needs; it should never be given access to anything else.

Is giving IUSR read Modify, Read & execute, List folder contents, Read, and Write permissions for the WordPress directory C:\inetpub\wwwroot\blog and its subfolders the correct and safest way to get WordPress working on IIS 8?

Community
  • 1
  • 1
dumbledad
  • 12,928
  • 20
  • 97
  • 226

1 Answers1

0

Giving NETWORK SERVICE write permission to the folders that WordPress needs to write to should do the trick.

UPDATE: NETWORK SERVICE will also need Read & execute, List folder contents and Read permissions.

EDIT: Thought I'd add the file/folders etc.. for completeness:

/wp-config.php
/wp-content/       (recursively)
superphonic
  • 7,598
  • 6
  • 28
  • 61
  • I get "Error saving media attachment" when I remove the IUSR permissions and replace them with the ones you suggest. – dumbledad Dec 20 '13 at 17:03
  • `NETWORK SERVICE` is one group. You also have to give Read & execute, List folder contents and Read to `NETWORK SERVICE`. Also just so we are clear. `IUSR` still needs to be there, just without Write access. Also make sure you apply the `NETWORK SERVICE` group recursively so all the sub folders have the permission... – superphonic Dec 20 '13 at 17:06
  • Nope, giving Read & execute, List folder contents, and Read to IUSR recursively on C:\inetpub\wwwroot\blog and Full Control to NETWORK SERVICE recursively on C:\inetpub\wwwroot\blog\wp-content and C:\inetpub\wwwroot\blog\wp-config.php gives me an "Error saving media attachment" when uploading media via the console – dumbledad Dec 20 '13 at 17:11
  • Check Where PHP's temp directory is set to, and add `NETWORK SERVICE` to that folder with the same permission as above. Use `` to get the temp directory location... – superphonic Dec 20 '13 at 17:15