mkdir ~/happy
chmod 0700 ~/happy
sudo apt install -y samba
sudo nano /etc/samba/smb.conf
# Networked Attached Storage Share
[nas]
comment = welcome to NAS
path = /storage/nas
read only = no
guest ok = no
browsable = yes
valid users = danaukes
other useful parameters:
read only = yes
guest ok = no
browsable = yes
valid users = user1 user2
write list = user1
read list = user2
sudo systemctl restart smbd.service
sudo systemctl restart smbd.service nmbd.service
sudo ufw allow samba
sudo smbpasswd -a <username>
Then connect to your new share!
Make sure you have updated file owner, group, and permissions to reflect the samba settings here. You might need to ensure that the folder above the shared folder gives the particular user access, as well.
chown -R username:groupname /path/to/share
chown -R 755 /path/to/share
chown 755 /path/to/