-> Install SAMB server using below mentioned command:
apt-get install samba
-> Create a SMB share directory (in my case /var/www/html/pub/)
mkdir /var/www/html/pub/
-> Configure permissions on newly created SMB share directory:
chmod 0555 /var/www/html/pub/
chown -R nobody:nogroup /var/www/html/pub/
Run below mentioned command to remove default content of SAMBA server cofig file
echo > /etc/samba/smb.conf
-> Put below mentioned content in file '/etc/samba/smb.conf'
[global]
workgroup = WORKGROUP
server string = Samba Server %v
netbios name = indishell-lab
security = user
map to guest = bad user
name resolve order = bcast host
dns proxy = no
bind interfaces only = yes
[ica]
path = /var/www/html/pub
writable = no
guest ok = yes
guest only = yes
read only = yes
directory mode = 0555
force user = nobody
Now, restart SAMBA server to apply new configuration spcified in config file /etc/samba/smb.conf
service smbd restart