Just run below mentioned command in terminal prompt.
sudo apt-get install samba chmod 0755 /var/lib/samba chmod 0755 /var/cache/samba
Follow the steps to share the folder in ubuntu machine.
Right-click the folder which you want to share, Then Click “Sharing options” option.
Popup will appear with sharing folder name.
Mark the check box “Share this folder” and click “Create Share” to share the folder.