Is there a way I can share a folder and assign permissions on Mac using commands in terminal, like we use the
calcs commands in windows?
Mountain Lion (OS X 10.8) added several command line tools, including
sharing. To share a folder:
sharing -a ~/Documents/Public
Its man page and this article on the Apple.StackExchange blog explain how to use it in more detail.
Have a look at this article, it should give you an idea on how to use
dscl to create a new SharePoint entry. Afterwards you´ll then want to use
chmod to set permissions to
rwxr-xr-x and add ACLs that deny members of group
everyone to delete the SharePoint.