Skip to content

[BUG] Permission denied for a smb volume mount only if initially defined via compose #798

@deafmute1

Description

@deafmute1

Description

Dockhand fails to mount cifs/smb shares defined in compose. But the same definition works fine via the volume create UI. Subsequently, the compose is successful at creating the volume from scratch on future attempts.

The compose volume definitions previously worked fine when used outside dockhand (i.e. directly via docker compose up)

Steps to reproduce

I create a smb volume in compose:

volumes:
  media:
    driver_opts:
      type: cifs
      o: username=${SMB_USER},password=${SMB_PASSWORD},uid=1001,gid=1001,vers=3.0
      device: //10.10.10.1/media/media

Then when I deploy that stack I get a permission denied error:

[dockhand-dockhand-1] Container plex-plex-1 Error response from daemon: failed to populate volume: error while mounting volume '/var/lib/docker/volumes/plex_media/_data': failed to mount local volume: mount //10.10.10.1/media/media:/var/lib/docker/volumes/plex_media/_data, data: username=docker,password=********,uid=1001,gid=1001,vers=3.0: permission denied 
[dockhand-dockhand-1] Error response from daemon: failed to populate volume: error while mounting volume '/var/lib/docker/volumes/plex_media/_data': failed to mount local volume: mount //10.10.10.1/media/media:/var/lib/docker/volumes/plex_media/_data, data: username=docker,password=********,uid=1001,gid=1001,vers=3.0: permission denied

However, if I go volumes, delete the existing failed/orphaned plex_media and manually recreate it like so:

Image

It works fine, I can now browse it in the volumes tab, and I can successfully deploy my stack that relies on this volume.

Additionally, now that I have successfully mounted it once, if I delete the stack, delete the volume, then deploy the stack again, it can now create the volume without error.

Logs

From dockhand:

[dockhand-dockhand-1] Container plex-plex-1 Error response from daemon: failed to populate volume: error while mounting volume '/var/lib/docker/volumes/plex_media/_data': failed to mount local volume: mount //10.10.10.1/media/media:/var/lib/docker/volumes/plex_media/_data, data: username=docker,password=********,uid=1001,gid=1001,vers=3.0: permission denied 
[dockhand-dockhand-1] Error response from daemon: failed to populate volume: error while mounting volume '/var/lib/docker/volumes/plex_media/_data': failed to mount local volume: mount //10.10.10.1/media/media:/var/lib/docker/volumes/plex_media/_data, data: username=docker,password=********,uid=1001,gid=1001,vers=3.0: permission denied

From host's dmesg:

[ 1581.887447] CIFS: Status code returned 0xc000006d STATUS_LOGON_FAILURE
[ 1581.887458] CIFS: VFS: \\10.10.10.1 Send error in SessSetup = -13
[ 1581.887496] CIFS: VFS: cifs_mount failed w/return code = -13

Browser logs

Dockhand version

v1.0.21 d256fe9 (Mar 13, 2026)

Hawser version (if used)

No response

Connection mode

direct via socket-proxy

Please confirm the following

  • I have updated the title field above with a concise description.
  • I have already searched for relevant existing issues and discussions before opening this report.

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't working

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions