samba

apt-get install samba
vi /etc/samba/smb.conf
[HD]
comment = HD
path = /media/hd
browseable = Yes
read only = No
writable = Yes
create mask = 0777
directory mask = 0777
guest only = Yes
guest ok = Yes
systemctl restart smbd.service
testparm -s

Samba share protected with username and password. Create a unix user:

useradd -d /data -u 31278 -U -s /bin/false -p wertfgfgzdv8 smb

Change password:

smbpasswd -a user
chown user:user /mnt/bpool/user
vim /etc/samba/smb.conf
[user]
path = /mnt/bpool/user
read only = no
writable = yes
browseable = yes
public = yes
valid users = user
create mask = 0640
directory mask = 0750
[data]
comment = Data
path = /data
read only = no
writable = yes
guest ok = no
public = yes
valid users = smb,root
create mask = 0640
directory mask = 0750
force user = root
force group = root
systemctl restart smbd.service