Hi, I’ve tried running samba from docker compose on ubuntu server with this resource https://hub.docker.com/r/dockurr/samba I changed the default volume from “- ./samba:/storage” to “- /mnt/my_ext_hdd/my_dir/my_subdir” The container deploys fine, but I get permission error when trying to access the shared volume from windows? Anyone with some suggestionshoew to fix? Thanks
You’re running into that permission error because of how Docker handles file permissions between the host and the container. It’s by design for security reasons. The user inside the container likely doesn’t have access to the mounted directory unless the UID and GID match what’s on the host. You can work around it, but it’s locked down intentionally.
Also, what’s the use case here? What do you need file sharing via Samba in a Docker container for? If it’s just about moving files in and out, docker cp or docker exec -it container /bin/bash might be easier.
Idk about OP, but I want to run all of my exposed services in containers for security benefits, and I use samba to provide an SMB share for Windows clients.
Well, I’m not trying to share from within the docker container. I just want to run the samba service from a container. The share is an external hard drive connected to the server. I want to be able to move files to and from the ext hdd from a windows machine.