for-win icon indicating copy to clipboard operation
for-win copied to clipboard

Installer says: "Exception: Path contains symlink" - Yes, I know! I need it that way (not enough space on C).

Open HWiese1980 opened this issue 4 years ago • 12 comments

  • [x] I have tried with the latest version of Docker Desktop
  • [x] I have tried disabling enabled experimental features
  • [ ] I have uploaded Diagnostics
  • Diagnostics ID:

Actual behavior

Installer fails with System.Exception stating "Path contains symlink". I'm perfectly aware of that.

Expected behavior

Installer works even if there are symlinks in the target path.

I need the symlinks because my C drive is a rather small SSD. I need Docker Desktop to reside on another drive, but since the installer won't let me choose a destination, I'm bound to using other means to get it off my SSD. Docker Desktop itself works like a charm on my machine, even with symlinks.

Why does the installer have issues with symlinks while Docker Desktop itself does not?

Information

  • Windows Version: 11 Pro (21H2, Build 22000.675)
  • Docker Desktop Version: 4.8.0, updating to 4.8.1
  • WSL2 or Hyper-V backend? WSL2
  • Are you running inside a virtualized Windows e.g. on a cloud server or a VM: No, directly on my home PC

Output of & "C:\Program Files\Docker\Docker\resources\com.docker.diagnose.exe" check

[2022-05-24T09:10:30.888702300Z][com.docker.diagnose.exe][I] ipc.NewClient: bf5929e1-com.docker.diagnose -> \\.\pipe\dockerBackendV2 com.docker.service.exe
[goroutine 1 [running, locked to thread]:
[win/backend/pkg/service.NewClientForPath(...)
[       win/backend/pkg/service/service.go:42
[win/backend/pkg/service.NewClient({0xf714c4, 0x13}, {0x0, 0x0, 0x0})
[       win/backend/pkg/service/service.go:31 +0xd0
[common/pkg/diagkit/gather/diagnose.init()
[       common/pkg/diagkit/gather/diagnose/ipc_windows.go:23 +0x11f
Starting diagnostics

[PASS] DD0027: is there available disk space on the host?
[PASS] DD0028: is there available VM disk space?
[PASS] DD0031: does the Docker API work?
[PASS] DD0004: is the Docker engine running?
[PASS] DD0011: are the LinuxKit services running?
[PASS] DD0016: is the LinuxKit VM running?
[PASS] DD0001: is the application running?
[SKIP] DD0018: does the host support virtualization?
[PASS] DD0002: does the bootloader have virtualization enabled?
[PASS] DD0017: can a VM be started?
[PASS] DD0024: is WSL installed?
[PASS] DD0021: is the WSL 2 Windows Feature enabled?
[PASS] DD0022: is the Virtual Machine Platform Windows Feature enabled?
[PASS] DD0025: are WSL distros installed?
[PASS] DD0026: is the WSL LxssManager service running?
[PASS] DD0029: is the WSL 2 Linux filesystem corrupt?
[PASS] DD0015: are the binary symlinks installed?
[PASS] DD0003: is the Docker CLI working?
[PASS] DD0013: is the $PATH ok?
[PASS] DD0005: is the user in the docker-users group?
[PASS] DD0007: is the backend responding?
[PASS] DD0014: are the backend processes running?
[PASS] DD0008: is the native API responding?
[PASS] DD0009: is the vpnkit API responding?
[PASS] DD0010: is the Docker API proxy responding?
[PASS] DD0006: is the Docker Desktop Service responding?
[PASS] DD0012: is the VM networking working?
[PASS] DD0032: do Docker networks overlap with host IPs?
[SKIP] DD0030: is the image access management authorized?
[PASS] DD0033: does the host have Internet access?
No fatal errors detected.

Steps to reproduce the behavior

  1. Move your Docker Desktop folder to another drive
  2. Create a symlink at its envisaged location (C:\Program Files... you know where)
  3. Try auto update installer

HWiese1980 avatar May 24 '22 09:05 HWiese1980

so any update on this issue? When docker desktop give option to place all this massive folders (windowsfilter and wsl) to other disk? not just on system?

Thoth87 avatar Jun 08 '22 09:06 Thoth87

The data root or Docker folder can be placed on any drive, only the config directory is still needed in C:\ProgramData\Docker. You will still have all the directories, but they will stay empty. (https://docs.docker.com/engine/reference/commandline/dockerd/#daemon-configuration-file)

I have mine gong to D:\ProgramData\Docker.

Change Docker daemon.json (settings Docker Engine):

{ "data-root": "D:\ProgramData\Docker", "experimental": false, }

guyelight avatar Jun 08 '22 16:06 guyelight

Sorry, took me some days to return to the issue. @guyelight I'm going to try that, thank you. I'll report back if that solves my problem.

HWiese1980 avatar Jun 18 '22 18:06 HWiese1980

I'm good now, Emmanuel sent me a build that fixes the issue. It should be fixed in the 4.10 build.

Thanks, Guy

On Sat, Jun 18, 2022, 2:27 PM Hendrik Wiese @.***> wrote:

Sorry, took me some days to return to the issue. @guyelight https://github.com/guyelight I'm going to try that, thank you. I'll report back if that solves my problem.

— Reply to this email directly, view it on GitHub https://github.com/docker/for-win/issues/12744#issuecomment-1159532908, or unsubscribe https://github.com/notifications/unsubscribe-auth/AGZZHT4VIU3FAA3K5VRITWLVPYIIZANCNFSM5WY24IMQ . You are receiving this because you were mentioned.Message ID: @.***>

guyelight avatar Jun 18 '22 21:06 guyelight

---------- Forwarded message --------- From: Per Manniche Bering @.> Date: Thu, Jun 16, 2022, 9:51 AM Subject: Re: [docker/for-win] WindowsContainersController.FixPermissions sets acls too deep (Issue #12701) To: docker/for-win @.> Cc: Guy Light @.>, Mention @.>

@ebriney https://github.com/ebriney your latest build 81320 still works, and now also the UI works (settings, dashboard etc.), debug messages still present though.

— Reply to this email directly, view it on GitHub https://github.com/docker/for-win/issues/12701#issuecomment-1157686200, or unsubscribe https://github.com/notifications/unsubscribe-auth/AGZZHTYS2Y4EVDRKFUTMXSDVPMWM7ANCNFSM5VDPT76A . You are receiving this because you were mentioned.Message ID: @.***>

guyelight avatar Jun 18 '22 22:06 guyelight

@guyelight Docker Desktop 4.9.1 doesn't allow me to move the data-root to anywhere else because it scans the data directory for reparse points ("symlinks") when the directory is not in its default location. And the data directory always contains reparse points, which causes the startup to fail.

Is that fixed in the 4.10 build as well? For now, I had to downgrade to 4.8.2.

Here's the stacktrace:

System.Exception:
Path contains symlink: D:\DockerData\windowsfilter\6ba0be2fd8613f83fe9718a3b14a6691706c563520eaa29bd43da1fd0ae24b8a\Files\Program Files\desktop.ini
   at Docker.Core.PermissionUtils.CheckPath(String path, Boolean allowDockerAppData) in C:\workspaces\PR-18120\src\github.com\docker\pinata\win\src\Docker.Core\PermissionUtils.cs:line 272
   at Docker.Core.PermissionUtils.CheckACLBeforeRestrictAndCheckSymlink(ILogger logger, String path) in C:\workspaces\PR-18120\src\github.com\docker\pinata\win\src\Docker.Core\PermissionUtils.cs:line 94
   at Docker.Core.PermissionUtils.ApplyACLOnChildren(ILogger logger, String path, Int32 recurse) in C:\workspaces\PR-18120\src\github.com\docker\pinata\win\src\Docker.Core\PermissionUtils.cs:line 79
   at Docker.Core.PermissionUtils.ApplyACLOnChildren(ILogger logger, String path, Int32 recurse) in C:\workspaces\PR-18120\src\github.com\docker\pinata\win\src\Docker.Core\PermissionUtils.cs:line 63
   at Docker.Core.PermissionUtils.ApplyACLOnChildren(ILogger logger, String path, Int32 recurse) in C:\workspaces\PR-18120\src\github.com\docker\pinata\win\src\Docker.Core\PermissionUtils.cs:line 63
   at Docker.Core.PermissionUtils.ApplyACLOnChildren(ILogger logger, String path, Int32 recurse) in C:\workspaces\PR-18120\src\github.com\docker\pinata\win\src\Docker.Core\PermissionUtils.cs:line 63
   at Docker.Core.PermissionUtils.ApplyACLOnChildren(ILogger logger, String path, Int32 recurse) in C:\workspaces\PR-18120\src\github.com\docker\pinata\win\src\Docker.Core\PermissionUtils.cs:line 63
   at Docker.Backend.HttpAPI.WindowsContainersController.FixPermissions(String path) in C:\workspaces\PR-18120\src\github.com\docker\pinata\win\src\Docker.Backend\HttpAPI\WindowsContainersController.cs:line 72
   at Docker.Backend.HttpAPI.WindowsContainersController.Start(WindowsContainerStartRequest request) in C:\workspaces\PR-18120\src\github.com\docker\pinata\win\src\Docker.Backend\HttpAPI\WindowsContainersController.cs:line 37
   at System.Web.Http.Controllers.ReflectedHttpActionDescriptor.ActionExecutor.<>c__DisplayClass6_1.<GetExecutor>b__0(Object instance, Object[] methodParameters)
   at System.Web.Http.Controllers.ReflectedHttpActionDescriptor.ExecuteAsync(HttpControllerContext controllerContext, IDictionary`2 arguments, CancellationToken cancellationToken)
--- End of stack trace from previous location where exception was thrown ---
   at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw()
   at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)
   at System.Web.Http.Controllers.ApiControllerActionInvoker.<InvokeActionAsyncCore>d__1.MoveNext()
--- End of stack trace from previous location where exception was thrown ---
   at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw()
   at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)
   at System.Web.Http.Controllers.ActionFilterResult.<ExecuteAsync>d__5.MoveNext()
--- End of stack trace from previous location where exception was thrown ---
   at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw()
   at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)
   at System.Web.Http.Dispatcher.HttpControllerDispatcher.<SendAsync>d__15.MoveNext()

fschmied avatar Jun 21 '22 15:06 fschmied

I don't see this bug in the release notes for Docker 4.10 (or later), but it seems to work now (4.11.0).

fschmied avatar Aug 02 '22 08:08 fschmied

Great. Now that I've bought a bigger SSD for my C drive... :-D

Anyway... Awesome, if it does!

HWiese1980 avatar Aug 02 '22 08:08 HWiese1980

Problem still exist on version 4.11.1:

Information:

Edition Windows 11 Pro Version 21H2 OS build 22000.795 Experience Windows Feature Experience Pack 1000.22000.795.0 Docker-desktop: 4.11.1 (84025)

Configuration:

{ "data-root": "E:/Docker", "debug": false, "experimental": false, "registry-mirrors": [], "storage-opts": [ "size=80GB" ] }

Actual behavior

  • Make clean docker run ( eg after formatting e: )
  • Download windows image
  • Make docker-desktop restart
  • Below Exception occure

Docker exception:

System.Exception: Path contains symlink: E:/Docker\windowsfilter\144d7180ff0a0ee99f8f4ed0c0e5bfbedd66f0904b5b28ee71ebdbbd78955d56\Files\ProgramData at Docker.Core.PermissionUtils.CheckPath(String path, Boolean allowDockerAppData) in C:\workspaces\main-merges\src\github.com\docker\pinata\win\src\Docker.Core\PermissionUtils.cs:line 284 at Docker.Core.PermissionUtils.CheckACLBeforeRestrictAndCheckSymlink(ILogger logger, String path) in C:\workspaces\main-merges\src\github.com\docker\pinata\win\src\Docker.Core\PermissionUtils.cs:line 106 at Docker.Core.PermissionUtils.ApplyACLOnChildren(ILogger logger, String path, Int32 recurse) in C:\workspaces\main-merges\src\github.com\docker\pinata\win\src\Docker.Core\PermissionUtils.cs:line 52 at Docker.Core.PermissionUtils.ApplyACLOnChildren(ILogger logger, String path, Int32 recurse) in C:\workspaces\main-merges\src\github.com\docker\pinata\win\src\Docker.Core\PermissionUtils.cs:line 66 at Docker.Core.PermissionUtils.ApplyACLOnChildren(ILogger logger, String path, Int32 recurse) in C:\workspaces\main-merges\src\github.com\docker\pinata\win\src\Docker.Core\PermissionUtils.cs:line 66 at Docker.Core.PermissionUtils.ApplyACLOnChildren(ILogger logger, String path, Int32 recurse) in C:\workspaces\main-merges\src\github.com\docker\pinata\win\src\Docker.Core\PermissionUtils.cs:line 66 at Docker.Core.PermissionUtils.ApplyACLOnChildren(ILogger logger, String path, Int32 recurse) in C:\workspaces\main-merges\src\github.com\docker\pinata\win\src\Docker.Core\PermissionUtils.cs:line 66 at Docker.Backend.HttpAPI.WindowsContainersController.FixPermissions(String path) in C:\workspaces\main-merges\src\github.com\docker\pinata\win\src\Docker.Backend\HttpAPI\WindowsContainersController.cs:line 96 at Docker.Backend.HttpAPI.WindowsContainersController.<Start>d__7.MoveNext() in C:\workspaces\main-merges\src\github.com\docker\pinata\win\src\Docker.Backend\HttpAPI\WindowsContainersController.cs:line 60 --- End of stack trace from previous location where exception was thrown --- at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw() at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task) at System.Threading.Tasks.TaskHelpersExtensions.<CastToObject>d__11.MoveNext() --- End of stack trace from previous location where exception was thrown --- at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw() at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task) at System.Web.Http.Controllers.ApiControllerActionInvoker.d__1.MoveNext() --- End of stack trace from previous location where exception was thrown --- at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw() at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task) at System.Web.Http.Controllers.ActionFilterResult.d__5.MoveNext() --- End of stack trace from previous location where exception was thrown --- at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw() at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task) at System.Web.Http.Dispatcher.HttpControllerDispatcher.d__15.MoveNext() `

marianob85 avatar Aug 10 '22 12:08 marianob85

There hasn't been any activity on this issue for a long time. If the problem is still relevant, add a comment on this issue. If not, this issue will be closed in 30 days.

Mark the issue as fresh with a /remove-lifecycle stale comment. Stale issues will be closed after an additional %v days of inactivity.

Prevent issues from auto-closing with a /lifecycle frozen comment.

/lifecycle stale

docker-robott avatar Nov 08 '22 01:11 docker-robott

Yes, this is very much still an issue!

Sil3ntStorm avatar Nov 22 '22 13:11 Sil3ntStorm

Closed issues are locked after 30 days of inactivity. This helps our team focus on active issues.

If you have found a problem that seems similar to this, please open a new issue.

/lifecycle locked

docker-robott avatar Jan 21 '23 03:01 docker-robott