How to connect with File Sharing on your Mac

Learn how to use File Sharing to connect to other Macs, Windows computers, and file servers.

Sharing Files

To enable File Sharing in OS X, open the Sharing pane of System Preferences and select the option for File Sharing. Windows computers and Macs can then see your computer on the local network. 

the Sharing preferences window

When you connect from a Mac using OS X Mavericks or OS X Yosemite to another computer using file sharing, your Mac automatically tries to use the Service Message Block (SMB) protocol to communicate. If SMB is not available, OS X tries to connect using Apple File Protocol (AFP).

To connect to a Mac or Windows computer that is sharing files on your local network, look under the Shared section of any Finder window.

a Finder window

You can also access local file shares from Open and Save windows and sheets.

the open and save window

To connect to a file server directly, use the Connect To Server feature of the Finder. Select Go > Connect To, and enter a URL, IP address or DNS name.

the Connect To window

You can attempt to force a specific connection protocol (such as SMB or AFP) by using a valid URL. As long as the server you are connecting to allows the protocol you specify, the URL should work.

    smb://ServerName/ShareName
    afp://DOMAIN;User@ServerName/ShareName

Advanced Options

If you want to limit which protocols can be used to connect to your computer using File Sharing, click the Advanced Options button in the Sharing pane. You can then select which protocols are used by your Mac. By default, OS X Mavericks and later automatically enable SMB and AFP for compatibility with Windows computers, Macs using Mavericks and Yosemite, and Macs using older versions of OS X. 

 the sharing options sheet in Sharing preferences

Tips

  • When entering a URL, the name of the shared disk, volume, or directory you are attempting to connect to (share name) must be specified. You are not prompted for it.
  • You cannot type spaces as part of a share name when connecting. In place of any space in the share name, use %20 .
  • When troubleshooting a connection issue, you can ping the IP address of the other computer using Network Utility. A successful ping verifies a TCP/IP connection between the two computers. This is an important first troubleshooting step when there's no response or a timeout for a connection attempt, since SMB connections involving a Mac require TCP/IP.  However, a successful ping does not mean the SMB service is also available or working from the other computer.
  • Check Microsoft support resources for information about setting up file sharing on your Microsoft Windows-based computer. These may include Help files installed on your PC, or the Microsoft online Knowledge Base. For example, see this article for Windows 8 information: "Turn sharing on and off" in Windows 8 or Windows RT.
  • When troubleshooting an SMB connection issue, use Console in the Utilities folder. Console logs can help advanced users identify an issue. Note that some log files may only appear when logged in as an administrator.
  • If you are connecting to a Windows SMB resource, check to see if your firewall is blocking TCP ports 137, 138, 139 and 445. After trying the above steps, you may perform advanced troubleshooting by inspecting log entries in the Event Log of the Windows SMB resource (if you have access to it), or the relevant logs in Console on your Mac.
  • If you are connecting to Windows XP, make sure that the Internet Connection Firewall settings on your Windows computer are not preventing your connection. SMB uses ports 137, 138, 139, and 445. These ports should be open on the Windows XP computer. This may require "Advanced" configuration of the XP firewall.
  • Mac OS X uses SMB only over the TCP/IP protocol, not the NetBEUI protocol.
  • It may be necessary to contact your network administrator in some situations in order to grant access to your Mac from the SMB resource, or its host network configuration.

 

Related

 

Important: Mention of third-party websites and products is for informational purposes only and constitutes neither an endorsement nor a recommendation. Apple assumes no responsibility with regard to the selection, performance or use of information or products found at third-party websites. Apple provides this only as a convenience to our users. Apple has not tested the information found on these sites and makes no representations regarding its accuracy or reliability. There are risks inherent in the use of any information or products found on the Internet, and Apple assumes no responsibility in this regard. Please understand that a third-party site is independent from Apple and that Apple has no control over the content on that website. Please contact the vendor for additional information.
Last Modified:
Helpful?

Additional Product Support Information

Start a Discussion

in Apple Support Communities
See all questions on this article See all questions I have asked
United States (English)