Sharing a folder on Mac using command in terminal?

6

2

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?

Sanket Patel

Posted 2011-04-05T13:01:32.790

Reputation:

Answers

8

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.

Daniel Beck

Posted 2011-04-05T13:01:32.790

Reputation: 98 421

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.

Asmus

Posted 2011-04-05T13:01:32.790

Reputation: 2 007