Monday, April 25, 2016

permissions - Cannot Access Shared Folder From IIS

From IIS I need to access a folder on another computer. Both servers are Window 2008 SP2, and they live in a Virtual Private Cloud on Amazon EC2. They reach one another by private IP -- they are in WORKGROUP, not a domain.



I can access the shared folder manually when logged in to the client as Administrator. But IIS gets "access denied." Here's what I have done:




  1. Set File Sharing = ON

  2. Set Password Protected Sharing = OFF

  3. Set Public Folder Sharing = ON

  4. Shared the folder


  5. Added permission to the share: Everyone, Full Control

  6. Added permission to the share: NETWORK SERVICE, Full Control

  7. Verified that File & Printer Sharing is checked in Windows Firewall

  8. Opened port 445 to inbound traffic from local sources



I tried adding \NETWORK SERVICE to the share but it says it does not recognize the machine, which makes sense, I guess.



As I said, from the other computer I have no trouble accessing the shared folder from my user account, but IIS is shut out. How does the file server even know the difference? I would assume that with Everyone given full control and password protected sharing turned off, it would not matter what the client user account is.




In any case, how to solve?



UPDATE: To clarify, I am not trying to serve up files on the share directly through IIS. Rather I am writing files to the share from my code (System.IO).

No comments:

Post a Comment

linux - How to SSH to ec2 instance in VPC private subnet via NAT server

I have created a VPC in aws with a public subnet and a private subnet. The private subnet does not have direct access to external network. S...