Take the 2-minute tour ×
Super User is a question and answer site for computer enthusiasts and power users. It's 100% free, no registration required.

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?

share|improve this question

migrated from stackoverflow.com Apr 6 '11 at 8:16

This question came from our site for professional and enthusiast programmers.

add comment

2 Answers

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.

share|improve this answer
add comment

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.

share|improve this answer
add comment

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.