In order to setup a samba server, you can follow the RaspberryPi guide for it.
Make sure to add permissions to the shared folder on the server, so that the SMB daemon will have permissions to write on it.
In addition, I found that when mounting the share on a MacOS computer, there were weird errors about files being in use and the like. The problem is that MacOS Finder adds a special .DS_Store
file to every folder and it produced a conflict when updating the contents of the file.
In order to solve it, just add this to your share, editing the smb.conf
file (usually located on /etc/samba
or the like):
veto files = /._*/.DS_Store/.Trashes/.TemporaryItems/
delete veto files = yes
The second line allows vetoed files to be deleted. Otherwise, already existing vetoed files would be stuck on the drive. (Note that “._*” prevents HFS+/APFS extended attributes from being stored on the SMB drive.)
From now on, .DS_Store
and other conflicting files will not be created on the server.