Accessing File
Services
One of the strengths of Mac OS X is its ability
to easily access networked file services provided by a variety of
different operating systems. In addition to accessing Mac OS X
Server computers, Mac OS X is able to access files stored on
Windows and UNIX file servers and allow applications to work with
the files on the servers as easily as working with files stored on
local volumes. This allows Mac OS X computers to be integrated into
mixed-computer networks.
Using Connect to Server
The Finder is the primary application used to
access files, including those stored on file servers. To connect to
these servers, begin by choosing Go > Connect to Server
(Command-K).
When you choose Connect to Server, the Finder
prompts you for an address. You can use an IP address, DNS name, or
local hostname for the server to which you want to connect. The
prefix to the address tells Mac OS X which file sharing protocol to
use. When you connect to a shared volume in this manner, the volume
is mounted in /Volumes and appears on the desktop and in the Finder
with other network and local volumes.
In addition to manually mounting a network
volume, you can configure your user preferences to automatically
mount a shared volume. Once the shared volume is mounted on the
desktop, open Accounts preferences, select the user account, and
click Login Items. The Login Items pane lists items that will open
automatically when the user logs in (the list may be empty). Drag
the icon for the shared volume from the Finder desktop into the
list, and verify that the volume name is listed. The next time that
user logs in, the volume will be mounted. (The user may be asked to
authenticate if the password was not saved to the user's keychain
when the volume was originally mounted.)
To unmount a shared volume, either drag it to
the Trash (which changes to an Eject icon) or choose File >
Eject (Command-E). Either action effectively breaks the connection
with the shared resource.
If you are connected to
a network volume and the server or network goes down, the volume
will remain listed in the Finder. If you attempt to access an
unreachable server, the spinning cursor will appear as the Finder
attempts to reconnect to the server. If it is unsuccessful, it will
remove (unmount) the volume.
Using Connect to Server, you can connect to the
following types of servers:
-
Apple Filing Protocol (AFP)
-
Server Message Block (SMB)
-
WebDAV
-
Network File System (NFS)
-
File Transfer Protocol (FTP)
The following sections explain how to connect to
the various types of servers. Since few readers have access to a
computer with all types of servers, you are not expected to
actually perform these step-by-step instructions. Simply read along
to understand the procedures.
Apple Filing Protocol (AFP)
The file sharing protocol most commonly used in
Mac OS X is Apple Filing Protocol (AFP). This protocol allows you
to mount volumes from computers running Mac OS 9 or earlier, as
well as computers running Mac OS X.
These steps demonstrate the process of using
Connect to Server to mount an AFP volume.
1.
|
Choose Go > Connect to Server
(Command-K).
The Connect to Server window appears.
|
2.
|
In the Server Address field, enter
afp://
followed by the server's IP address, DNS name, or local hostname,
optionally followed by a trailing slash.
NOTE
Connect to Server assumes that you want an AFP
volume if you do not specify a protocol.
|
3.
|
Click Connect.
|
4.
|
When prompted, specify that you want to
connect as a registered user, then enter a user name and password
for an account on the server.
NOTE
If the account doesn't have a password, you
won't be prompted for one.
|
5.
|
Click Connect.
A list of shared volumes to which you have access appears.
|
6.
|
Select the volumes you wish to mount
(Shift-click to select more than one), then click OK.
The shared volumes appear in the Sidebar at the left of the Finder
window.
NOTE
Previous versions of Mac OS X supported AFP
connections using AppleTalk networking, but Mac OS X 10.4 does
not.
|
7.
|
Select the mounted volume(s) and begin
dragging them to the Trash.
As you begin to drag the volumes to the Trash, the Trash icon
changes to the Eject icon. You can also eject volumes by selecting
them and choosing File > Eject (Command-E) or by clicking the
eject button next to the volume name in the Sidebar.
|
Server Message Block (SMB)
Another common file sharing protocol is Server
Message Block (SMB). Computers running Microsoft Windows use this
protocol to share files. Use it on Mac OS X to access files shared
by computers running Windows.
These steps demonstrate the process of using
Connect to Server to mount an SMB volume.
1.
|
Choose Go > Connect to Server
(Command-K).
The Connect to Server window appears.
|
2.
|
In the Server Address field, enter
smb://
followed by the server's IP address, DNS name, or local hostname,
optionally followed by a trailing slash.
NOTE
When browsing for SMB servers in the Connect to
Server browsing window on a network where DNS provides reverse
lookups, the domain name will be displayed instead of the computer
name. For details, refer to Knowledge Base document 107085, "Mac OS
X 10.2: Expected, User-Defined Windows (SMB) Computer Name Does Not
Appear in Connect to Server Dialog."
|
3.
|
Click Connect.
The SMB Mount dialog appears.
A Connecting to Server status dialog also appears.
|
4.
|
In the SMB dialog, from the "Select a share"
pop-up menu, choose the desired item.
Shared items are sometimes called share
points, because you don't necessarily have to share an
entire volume. You can choose to share only a particular folder on
a volume, if you wish.
|
5.
|
Click OK.
The SMB/CIFS (Common Internet File System) Filesystem
Authentication dialog appears.
|
6.
|
Enter the workgroup/domain, user name, and
password for an account on the server.
The administrator of the Windows computer can provide you with the
name of the workgroup. The default name is WORKGROUP.
NOTE
SMB won't let you log into an account without
entering a password. For accounts with no password, the user can
enter anything.
|
7.
|
Click OK.
The shared volume appears in the Sidebar at the left of the Finder
window.
|
NOTE
New in Mac OS X 10.4 is the ability to
authenticate to Windows servers using NT LAN Manager version 2
(NTLMv2). NTLMv2 provides the most secure way of authenticating for
Windows computers and is the default authentication method on
Windows Server 2003. Support for NTLMv2 from Mac OS X 10.4 means
that Mac clients can connect to Windows servers without requiring a
Windows administrator to enable a less secure authentication method
for Mac clients.
WebDAV
WebDAV is an extension of the Hypertext Transfer
Protocol (HTTP), typically used for editing web content. (This is
the same protocol you use when you access pages on the web with a
browser.) With WebDAV, however, you mount the website as a volume,
and you can add and modify files as well as read them.
These steps demonstrate the process of using
Connect to Server to mount a WebDAV volume.
1.
|
Choose Go > Connect to Server
(Command-K).
The Connect to Server window appears.
|
2.
|
In the Server Address field, enter
http://
followed by the server's IP address, DNS name, or local hostname,
optionally followed by a trailing slash.
|
3.
|
Click Connect.
|
4.
|
If a WebDAV File System Security Notice
appears, click Continue.
|
5.
|
If prompted, enter a user name and password for
an account on the server, then click OK.
The shared volume appears in the Sidebar at the left of the Finder
window.
|
NOTE
New in Mac OS X 10.4 is the ability to connect
to WebDAV servers using the secure HTTPS protocol. To connect to a
secure WebDAV server, specify the address using the prefix https,
such as: https://secureserver.pretendco.com. You can use Get Info
to see if a volume is mounted via HTTPS by looking at the server
URL under the General disclosure triangle.
Network File System (NFS)
NFS is the file sharing protocol used by most
UNIX systems. NFS servers are not considered as secure as other
file servers, such as AFP, because NFS authorizes access based on
the computer's IP address, rather than prompting a user for a name
and password. Because it is easy for a user to change a computer's
IP address, it is extremely easy for a computer to pose as an
authorized computer to gain access to the NFS server.
These steps demonstrate the process of using
Connect to Server to mount an NFS volume.
1.
|
Choose Go > Connect to Server
(Command-K).
The Connect to Server window appears.
|
2.
|
In the Server Address field, enter
nfs://
followed by the server's IP address, DNS name, or local hostname,
optionally followed by a trailing slash.
|
3.
|
Click Connect.
The shared volume appears in the Sidebar at the left of the Finder
window.
|
File Transfer Protocol (FTP)
FTP is important primarily because it is widely
used on the Internet for transferring files. Most UNIX-like
operating systems provide FTP services, and FTP clients are
available for nearly every computer operating system; Mac OS X is
no exception in either regard.
These steps demonstrate the process of using
Connect to Server to mount an FTP volume.
1.
|
Choose Go > Connect to Server
(Command-K).
The Connect to Server window appears.
|
2.
|
In the Server Address field, enter
ftp://
Discovering File Services
followed by the server's IP address, DNS name, or local hostname,
optionally followed by a trailing slash.
|
3.
|
Click Connect.
|
4.
|
When prompted, enter a user name and password
for an account on the server.
NOTE
FTP won't let you log in to an account without
entering a password. For accounts with no password, the user can
enter anything. FTP transmits all data, including the user name and
password, in the clear, and is not a secure method of exchange.
|
5.
|
Click OK.
The shared volume appears in the Sidebar at the left of the Finder
window.
|
NOTE
In Mac OS X, you can download files after
mounting an FTP volume using Connect to Server, but you cannot
upload files over FTP using the Finder. Uploading files to an FTP
server can be accomplished only with an FTP client such as Fetch
(www.fetchsoftworks.com) or
Transmit (www.panic.com).
Dealing with File Sharing Protocol
Issues
Usually, the protocol you need to use is
dictated by the server to which you are connecting. Even though you
may not have a choice, you should be aware of issues that can arise
when using the different protocols.
-
Files with resource
forks As explained in Lesson 4, "File Systems," Mac OS X files can
have a resource fork in addition to the traditional data fork. Just
as nonApple file systems such as UFS and FAT don't support files
with resource forks, file sharing protocols other than AFP do not
either. To compensate, Mac OS X will send the resource fork out as
a separate file with a prefix of period and underscore (for
example, ._TestFile.pdf), just as it does when writing to non-Apple
file systems. Because Mac OS X handles the conversion between
resource forks and ._ files automatically, you will not see the
files in the Finder. However, users on other operating systems such
as Windows will see two separate files.
-
Windows
servers To provide file sharing for Macintosh clients, some
administrators have configured Services for Macintosh (SFM) on
their Windows NT servers to provide AFP access. Unfortunately, SFM
does not provide full AFP 3.1 support. In addition to the problems
managing resource forks, SFM is also limited to 65,000 files on a
volume. Whenever possible, use a server that fully supports AFP
3.1, such as Mac OS X Server. For Windows servers, you can use
third-party AFP servers such as Group Logic's ExtremeZ-IP
(www.grouplogic.com).
|