Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Can't rename/move/delete files over SMB on macOS Ventura #50

Open
rowatt opened this issue Feb 5, 2023 · 2 comments
Open

Can't rename/move/delete files over SMB on macOS Ventura #50

rowatt opened this issue Feb 5, 2023 · 2 comments

Comments

@rowatt
Copy link

rowatt commented Feb 5, 2023

Behaviour

I have set up the container on an Intel Mac (macOS Ventura 13.2), and I am able to share a folder (public) to other macs on the network. However, while a client (macOS 13.2 or macOS 10.15) can mount and write to files, they cannot move or rename files (in Finder or from terminal) and when copying files from Finder, an error is generated resulting in a zero bytes file of the correct name (which can subsequently be opened and written to).

If I have the shared folder within the docker container itself, then the share works as expected and I can rename/move/delete files as expected.

Is this container expected to work when running on a macOS host?

Steps to reproduce this issue

  1. start Docker container on server
  2. mount share public on client mac
  3. go to /Volumes/public in terminal on client mac
  4. touch test.txt; mv test.txt test2.txt

Expected behaviour

File test2.txt should be created in public share.

Actual behaviour

File test.txt is created and error given:
mv: rename test.txt to test2.txt: Operation not supported

Configuration

  • Docker version (type docker --version) : Docker version 20.10.22, build 3a2c30b
  • Docker compose version if applicable (type docker-compose --version) : Docker Compose version v2.15.1
  • Platform (Debian 9, Ubuntu 18.04, ...) : macOS Ventura 13.2
  • System info (type uname -a) : Darwin 22.3.0 Darwin Kernel Version 22.3.0: Thu Jan 5 20:53:49 PST 2023; root:xnu-8792.81.2~2/RELEASE_X86_64 x86_64
  • Include all necessary configuration files : docker-compose.yml, .env, ...

docker-compose.yml:

version: '3.5'
services:
  samba:
    image: crazymax/samba 
    container_name: samba
    ports:
      - 139:139
      - 445:445
    volumes:
      - ./data:/data
      - ./public:/samba/public
    environment:
      - TZ=Europe/London
      - SAMBA_LOG_LEVEL=1
    restart: always

config.yml:

auth:
  - user: mark
    group: mark    
    uid: 501
    gid: 501
    password: test

global:
  - "log level = 3"
  - "fruit:aapl = yes"
  - "fruit:resource = xattr"
  - "fruit:nfs_aces = no"
  - "min protocol = SMB2_10"
  - "max protocol = SMB2_10"
  - "ea support = yes"

share:
  - name: public
    path: /samba/public
    browsable: yes
    readonly: no
    guestok: no
    writelist: mark
  • Admin user account on server mac is mark uid 501.
  • Same results with protocol = SMB3_11

Docker info

Client:
 Context:    desktop-linux
 Debug Mode: false
 Plugins:
  buildx: Docker Buildx (Docker Inc., v0.10.0)
  compose: Docker Compose (Docker Inc., v2.15.1)
  dev: Docker Dev Environments (Docker Inc., v0.0.5)
  extension: Manages Docker extensions (Docker Inc., v0.2.17)
  sbom: View the packaged-based Software Bill Of Materials (SBOM) for an image (Anchore Inc., 0.6.0)
  scan: Docker Scan (Docker Inc., v0.23.0)

Server:
 Containers: 5
  Running: 2
  Paused: 0
  Stopped: 3
 Images: 7
 Server Version: 20.10.22
 Storage Driver: overlay2
  Backing Filesystem: extfs
  Supports d_type: true
  Native Overlay Diff: true
  userxattr: false
 Logging Driver: json-file
 Cgroup Driver: cgroupfs
 Cgroup Version: 2
 Plugins:
  Volume: local
  Network: bridge host ipvlan macvlan null overlay
  Log: awslogs fluentd gcplogs gelf journald json-file local logentries splunk syslog
 Swarm: inactive
 Runtimes: io.containerd.runc.v2 io.containerd.runtime.v1.linux runc
 Default Runtime: runc
 Init Binary: docker-init
 containerd version: 9ba4b250366a5ddde94bb7c9d1def331423aa323
 runc version: v1.1.4-0-g5fd4c4d
 init version: de40ad0
 Security Options:
  seccomp
   Profile: default
  cgroupns
 Kernel Version: 5.15.49-linuxkit
 Operating System: Docker Desktop
 OSType: linux
 Architecture: x86_64
 CPUs: 2
 Total Memory: 3.842GiB
 Name: docker-desktop
 ID: PS4U:WDPK:GI5T:OULQ:7ZPB:2CFA:ZAHE:2EIN:ET6N:D4AX:OFJS:GFHN
 Docker Root Dir: /var/lib/docker
 Debug Mode: false
 HTTP Proxy: http.docker.internal:3128
 HTTPS Proxy: http.docker.internal:3128
 No Proxy: hubproxy.docker.internal
 Registry: https://index.docker.io/v1/
 Labels:
 Experimental: false
 Insecure Registries:
  hubproxy.docker.internal:5000
  127.0.0.0/8
 Live Restore Enabled: false
@toondaey
Copy link

Hello! Were you able to solve this?

@rowatt
Copy link
Author

rowatt commented Apr 28, 2023

No. In the end I installed SMB directly via Homebrew which has worked great, and much more reliable than native macOS file sharing had ever been for me.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants