Samba on Docker not writing to external HDD.


New Member
Feb 16, 2020
Reaction score
I've just built my new Home Assistant / Shinobi CCTV / Jellyfin server and it's running Debian 10. To easily access the media files / security footage, which are stored on a 3TB hard drive separate from the NVMe boot SSD I'd want to set up some samba shares, so i found a promising docker image (dperson/samba) and ran it on my machine. The hard drive is mounted at boot using /etc/fstab. My problem is the following: when I upload something to a share using my Windows PC the files are stored on the SSD, and not the HDD (don't show up when i ls in the mount directory but are accessible from the share itself). Any clues to what's going on?
Here is my /etc/fstab file:
# /etc/fstab: static file system information.
# Use 'blkid' to print the universally unique identifier for a
# device; this may be used with UUID= as a more robust way to name devices
# that works even if disks are added and removed. See fstab(5).
# <file system> <mount point>   <type>  <options>       <dump>  <pass>
# / was on /dev/nvme0n1p2 during installation
UUID=06c1de7d-1b47-470f-9067-22fc450e2605 /               ext4    errors=remount-ro 0       1
# /boot/efi was on /dev/nvme0n1p1 during installation
UUID=7EA5-0B80  /boot/efi       vfat    umask=0077      0       1
# swap was on /dev/nvme0n1p3 during installation
UUID=eaf3aee4-0131-4110-b760-453a27c5fcb8 none            swap    sw              0       0
# 3TB survaillance drive
UUID=5c1d15a2-ef43-4dcd-b7d8-cfdc9dcd13ag /mnt/hdd1   ext4    defaults        0       0
This is the command I used to spin up the container:
sudo docker run -it -p 139:139 -p 445:445 --name=samba --restart=unless-stopped -d dperson/samba -p \
            -u "myuser;verysecurepassword" \
            -s "media;/mnt/hdd1/media;yes;no;no" \
            -s "security;/mnt/hdd1/security;yes;no;no" \
            -w "WORKGROUP"
This is what i see in the share:

And this is the mount directory:

Thank you in advance!

By the way, i'm new to this forum, so if I did something wrong feel free to tell me!

Members online