Making folders writable for PHP when using a Windows IIs server
Many people come across problems using content management systems like Wordpress and Joomla on Windows Servers. One of the problems is folder permissions when you try to upload images or other content.
There are thousands of tutorials out there on how to fix this on Linux servers - chmod the properties of the folder to '777' - but what can you do when you are using a Windows server running IIs?
The error message I was getting in Wordpress was:
You may get a similar message from Mambo, Joomla or other content management systems.
In the case of Wordpress, the wp-content folder needs to be writable to IIs - or more specifically the internet user on your server. So how do you do this on Windows? Like all these things, its only easy when you know how.
Assuming you have access to the server e.g. by remote desktop:
- Navigate to the wp-content directory. This will most likely be in inetpub/wwwroot/yourdomain or a similar folder in the main web root.
- Right-click on the folder, select Properties, and then the 'Security' tab.
- This will show a list of the users with rights on your machine. You need to determine which one is used by the IIs process to serve web pages - usually the name in brackets after the username will be prefixed IUSR. In our case, as we are running Plesk to manage our server, the username is Plesk IIS User (ServerName/IUSR_mydomain)
- The only permissions set for this user will probably be the 'List Folder Contents'. You need to add the 'Write' permission, by clicking that box.
- Click 'Apply'.
- You're done (hopefully).
If you have the Plesk Control Panel, you can set these permissions directly in Plesk without having to remote desktop to the server:
- Click Domains, then the relevant domain, then File Manager. Navigate through the folders so you can see the appropriate directory name
- Click on the yellow padlock icon ('Change Permissions for Directory')
- Again choose the appropriate IIs user (the one with IUSR_ in the name)
- Click the 'Write' option
- Click OK.
Please let me know if you found this useful.

There are no comments for this entry.
[Add Comment]