8

Is there a way I can share a folder and assign permissions on Mac using commands in terminal, like we use the netshare and calcs commands in windows?

0

2 Answers 2

10

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.

1

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.

You must log in to answer this question.