I have a php application on my intranet web server running IIS 6 (Server "A") which contains a form to upload files to my other web server running IIS 7.5 (Server "B") on a different subnet. Server A has a mapped drive to a shared folder on Server B. I get a "permission denied" or "file not writeable" error when trying to copy() or fwrite() the uploaded file to Server B.

What security permissions do I need to set on the destination folder on Server B to allow Server A's IIS/php to write to the folder? I can copy files using Windows Explorer but of course that's with different user credentials.

I'd like to accomplish this task without adding an FTP server to Server B.


Are the two servers in the same domain?

IIS on server A will i imagine be running under the IIS guest account 'SERVER-A\IUSR_SERVER-A' so you would probably need to create a domain iis guest account 'DOMAIN\IUSR_etc' and run the anonymous access for the website on server A under that account, then assign that account permission to the directory on server b.

This will be because as far as I am aware you will not be able to grant the local user account 'SERVER-A\IUSR_SERVER-A' permissions on server b.

  • That makes sense to me. However, the two servers are not on the same domain. – MrMagoo Apr 26 '11 at 16:24
  • I think the only other option would be if it is possible to specify your login credentials in the connection string being used to copy the data. Though I'm not sure if or how this could be done, my playing in with websites is limited to flavours of asp. – Jim Apr 26 '11 at 16:31

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.