{"action":"closed","issue":{"url":"https://api.github.com/repos/dotnet/corefx/issues/7091","repository_url":"https://api.github.com/repos/dotnet/corefx","labels_url":"https://api.github.com/repos/dotnet/corefx/issues/7091/labels{/name}","comments_url":"https://api.github.com/repos/dotnet/corefx/issues/7091/comments","events_url":"https://api.github.com/repos/dotnet/corefx/issues/7091/events","html_url":"https://github.com/dotnet/corefx/issues/7091","id":142268836,"number":7091,"title":"System.IO.UnixFileSystem.MoveFile throwing `Access to the path is denied.` in Docker on Mac","user":{"login":"ctaggart","id":80104,"avatar_url":"https://avatars.githubusercontent.com/u/80104?v=3","gravatar_id":"","url":"https://api.github.com/users/ctaggart","html_url":"https://github.com/ctaggart","followers_url":"https://api.github.com/users/ctaggart/followers","following_url":"https://api.github.com/users/ctaggart/following{/other_user}","gists_url":"https://api.github.com/users/ctaggart/gists{/gist_id}","starred_url":"https://api.github.com/users/ctaggart/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/ctaggart/subscriptions","organizations_url":"https://api.github.com/users/ctaggart/orgs","repos_url":"https://api.github.com/users/ctaggart/repos","events_url":"https://api.github.com/users/ctaggart/events{/privacy}","received_events_url":"https://api.github.com/users/ctaggart/received_events","type":"User","site_admin":false},"labels":[{"url":"https://api.github.com/repos/dotnet/corefx/labels/2%20-%20In%20Progress","name":"2 - In Progress","color":"CCCCCC"},{"url":"https://api.github.com/repos/dotnet/corefx/labels/System.IO","name":"System.IO","color":"d4c5f9"}],"state":"closed","locked":false,"assignee":{"login":"stephentoub","id":2642209,"avatar_url":"https://avatars.githubusercontent.com/u/2642209?v=3","gravatar_id":"","url":"https://api.github.com/users/stephentoub","html_url":"https://github.com/stephentoub","followers_url":"https://api.github.com/users/stephentoub/followers","following_url":"https://api.github.com/users/stephentoub/following{/other_user}","gists_url":"https://api.github.com/users/stephentoub/gists{/gist_id}","starred_url":"https://api.github.com/users/stephentoub/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/stephentoub/subscriptions","organizations_url":"https://api.github.com/users/stephentoub/orgs","repos_url":"https://api.github.com/users/stephentoub/repos","events_url":"https://api.github.com/users/stephentoub/events{/privacy}","received_events_url":"https://api.github.com/users/stephentoub/received_events","type":"User","site_admin":false},"milestone":{"url":"https://api.github.com/repos/dotnet/corefx/milestones/6","html_url":"https://github.com/dotnet/corefx/milestones/1.0.0-rc2","labels_url":"https://api.github.com/repos/dotnet/corefx/milestones/6/labels","id":1365455,"number":6,"title":"1.0.0-rc2","description":"","creator":{"login":"joshfree","id":1302850,"avatar_url":"https://avatars.githubusercontent.com/u/1302850?v=3","gravatar_id":"","url":"https://api.github.com/users/joshfree","html_url":"https://github.com/joshfree","followers_url":"https://api.github.com/users/joshfree/followers","following_url":"https://api.github.com/users/joshfree/following{/other_user}","gists_url":"https://api.github.com/users/joshfree/gists{/gist_id}","starred_url":"https://api.github.com/users/joshfree/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/joshfree/subscriptions","organizations_url":"https://api.github.com/users/joshfree/orgs","repos_url":"https://api.github.com/users/joshfree/repos","events_url":"https://api.github.com/users/joshfree/events{/privacy}","received_events_url":"https://api.github.com/users/joshfree/received_events","type":"User","site_admin":false},"open_issues":53,"closed_issues":540,"state":"open","created_at":"2015-10-20T04:29:15Z","updated_at":"2016-03-21T21:17:50Z","due_on":"2016-04-08T07:00:00Z","closed_at":null},"comments":4,"created_at":"2016-03-21T06:28:10Z","updated_at":"2016-03-21T21:17:50Z","closed_at":"2016-03-21T21:17:50Z","body":"I created a docker image, so this should be easy to create, but the docker host needs to be OS X. When the docker host is Linux, this error does not occur, which leads me to believe it is something wrong with [System.IO.UnixFileSystem.MoveFile](https://github.com/dotnet/corefx/blob/master/src/System.IO.FileSystem/src/System/IO/UnixFileSystem.cs). It is being called from the latest `dotnet` 1.0.0-dev-001806 executable [from here I believe](https://github.com/dotnet/cli/blob/rel/1.0.0/src/dotnet/commands/dotnet-compile-fsc/Program.cs). cc @enricosada\r\n\r\nSteps to reproduce on Mac OS X:\r\n```\r\ngit clone https://github.com/ctaggart/visualfsharp-docker.git\r\ncd visualfsharp-docker\r\ndocker run --rm -ti -v $PWD/template:/root/template ctaggart/visualfsharp:1.0.0-alpha-160318\r\ncd template\r\n./build.sh\r\n``` \r\n\r\nIt will fail with:\r\n```\r\nUnhandled Exception: System.UnauthorizedAccessException: Access to the path is denied.\r\n   at System.IO.UnixFileSystem.MoveFile(String sourceFullPath, String destFullPath)\r\n   at Microsoft.DotNet.Tools.Compiler.Fsc.CompileFscCommand.Run(Stringrgs)\r\n   at Microsoft.DotNet.Cli.Program.ProcessArgs(Stringrgs)\r\n   at Microsoft.DotNet.Cli.Program.Main(Stringrgs)\r\n/usr/share/dotnet/bin/dotnet compile-fsc @/root/template/obj/Debug/dnxcore50/dotnet-compile.rsp returned Exit Code 134\r\n\r\nCompilation failed.\r\n```\r\n\r\nThe compilation actually succeeds and then `dotnet` tries to move the files because `fsc` didn't used to support compiling executables with a `dll` extension like `dotnet` wants. That hack can probably be removed, but I think there is still a bug dealing with `MoveFile`."}}