8

I've seen quite a few questions posted here and on Reddit about this topic, but I haven't been able to find the solution I am looking for, or a straight up answer like "no you cant change that".

I have File Sharing with smb setup on my macbook pro to access files from my windows pc. What I want is to have my public shared folder that I can put folders and files in to grab on my pc whenever, and stop my "Bloumbs" home folder and entire Macintosh HD volume from being shared.

Is it possible to do that? If so, how?

mac os file sharing

windows network file sharing

2
  • Welcome to Ask Different :) Did you try sharing just the public folder by clicking on the + button below the Shared Folders list view?
    – Nimesh Neema
    Commented Jun 14, 2019 at 7:46
  • 1
    @NimeshNeema Yes, when I add the public folder I want to share to the "Shared Folders", it does show up in my windows pc as a folder I can share from, but this does not remove my home folder or Macintosh HD from the shared folders on my pc. Screenshot here
    – 956MB
    Commented Jun 14, 2019 at 7:54

3 Answers 3

4

Turn off Volume shares (on by default)

sudo defaults write /Library/Preferences/SystemConfiguration/com.apple.smb.server VirtualAdminShares -bool NO

Turn off User shares (on by default)

sudo defaults write /Library/Preferences/SystemConfiguration/com.apple.smb.server VirtualHomeShares -bool NO

Then reboot your Mac. I've tried a few combinations of using launchctl unload -w on the smbd service, but the shares stayed open until I rebooted :(

0

There is a folder called Public in your home folder that is shared by default with read only privileges. You don't need to tick the file sharing option to share it.

1
  • 1
    That doesn't explain how to unshare home and root. (EDITED) Commented Feb 13, 2021 at 20:53
0
  1. Settings -> Users & Groups -> Add User (Sharing Only type), or use existing Standard type (non-Administrator) user.
  2. Settings -> File Sharing. Select shared folder, then click + sign on Users section to add new user to it (Read Only rights).
  3. (Optionally, allows to store password.) Click Options, mark new user at Windows File Sharing section.
  4. Access a shared folder with a new user. Since its role is not Administrator, additional folders won't be listed.

For more details, see Entire "Macintosh HD" shared through SMB File Sharing discussion and illustrations to the How to Set Up Network File Sharing on macOS article.

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .