One additional service I was looking for with my raspberry pi was to setup a file server. I wanted to access all my files stored in an external hard disk from multiple hand held devices. So, I decided to install Samba on Raspberry Pi as a file server to store, backup, and copy files from all the other computers, mobiles, and networked-enabled devices in my drive shared over the network.
Samba is a free soft ware re-implementation of the SMB/CIFS networking protocol. It provides file and print services for various Microsoft Windows clients and can integrate with a Microsoft Windows Server domain, either as a Domain Controller (DC) or as a domain member. It is a standard on nearly all distribution of Linux that is majorly used to copy files from different computers within the network. Wikipedia
In raspi or any flavor of Debian, samba could be used with the apt-get command as below:
# First install samba and samba-common-bin
sudo apt-get install samba samba-common-bin
# Once the libraries are installed we need to configure the samba server and define the shared path, user, and its permission
# open the config file in editor
sudo nano /etc/samba/smb.conf
# In the editor copy the following and change (1) path to the shared folder (2) force user to user allowed to access
[Nano Storage]
Comment = Pi Server
Path = /media/pi/Raspberry_drive
Browseable = yes
Writeable = yes
only guest = no
create mask = 0777
directory mask = 0777
Public = yes
Guest ok = yes
force user = pi
# ctrl + x to save and close the editor
Finally, once the setting is done, reload the samba using the following command, and folder is shared with in the network
sudo /etc/init.d/samba reload
# sudo /etc/init.d/samba-ad-dc reload for ubuntu 18.04