Search code examples
iistfsmsbuildwebdeploypublish-profiles

FileSystem Deploy error - unable to create directory, access is denied


I am using TFS build process with the following MSBuild arguments:

/p:DeployOnBuild=True /p:PublishProfile=Development

The publish profile works when run from my machine in VS, but when it is run from the build server, it fails with this error:

Unable to create directory "\\10.21.8.24\w$\Connector". Access to the path '\\10.21.8.24\w$\Connector' is denied.

This is a FileSystem publish.

I tried specifying the permissions for the user account that the TFSBuildServiceHost service runs as on the target machine. I've added full control on the entire W: drive, as well as I have created a share on the Connector folder and allowed the read & write access of this user to it.

Another thing I tried was stopping the web application in the IIS management console - but, the error still stays the same.


Solution

  • First, you could double check the account permissions by manually RDC that machine and try to access this \\10.21.8.24\w$\Connector folder using your TFS build service account, ensure this folder can be found and accessed successfully.

    Also make sure the Connector folder is writable not Read Only.


    Update

    w$ is a Admin share.

    As “Administrative shares” are defined all the default network shares that can be accessed remotely only from network administrators. And there are some firewall settings which may block the connection.

    More details please take a look at this blog.