mount_afpfs

mount an AFP filesystem using FUSE

SYNOPSIS

mount_afpfs [-o options] afp_url mountpoint

DESCRIPTION

The mount_afpfs command is used to mount an AFP (Apple Filing Protocol) volume in the format afp://[user[;AUTH=uamname][:password]@]host[:port]/volumename at the designated mountpoint.

This command is a symlink to the afpc(1) executable, which is a full implementation to mount AFP volumes using the FUSE infrastructure. It communicates with afpfsd(1) , a daemon that manages AFP sessions.

In order to mount multiple AFP volumes simultaneously, the afpc(1) talks to a per-user manager daemon (afpfsd in manager mode), which spawns a dedicated afpfsd daemon for each mount request.

The arguments and options are:

-o options

A comma-separated list of the options below. Any other option is skipped with a message. An option longer than 255 bytes, or timeouts longer than 255 bytes together, stop the command with an error.

volpass=password

Set the volume password (since there is no facility for that in an AFP URL).

rw

Mount the volume as writeable. This is the default.

ro

Mount the volume as readonly.

flush_on_close

Flush a file written through the mount to the server’s disk when the kernel releases it after its last descriptor is closed, or at unmount at the latest, with FPSyncFork, or with FPFlushFork below AFP 3.1 and on a server that refuses FPSyncFork. On Linux the release follows close(2), which neither waits for the flush nor reports its failure. A resource fork set or removed as an extended attribute is flushed before the call returns, which reports a failed flush. By default the client flushes for fsync(2), fdatasync(2) and, on Linux, writes and copies to a file opened with O_SYNC or O_DSYNC, and on Time Capsule, AirPort and Mac servers also when a written resource fork is closed and before a read of a file written through another descriptor.

group=groupname

Mount the volume as groupname.

user=username

Mount the volume as username.

attr_timeout=seconds

How long the kernel answers for a file’s attributes from its cache before it asks the server again (default: 1).

entry_timeout=seconds

How long the kernel answers a name’s lookup from its cache (default: 1).

negative_timeout=seconds

How long the kernel on Linux and FreeBSD answers that a name does not exist (default: 0, asked every time).

afp_url

The AFP URL to mount, in the format:

afp://[user[;AUTH=uamname][:password]@]host[:port]/volume

Specifies the AFP server and sharepoint to be mounted. It can also include the username and password needed for authentication. The uamname parameter represents the authentication method’s full name or shorthand. If no port is provided, the default port 548 is used.

mountpoint

The path to the mount point, which must be a directory where the user has write permissions.

EXAMPLES

The following example demonstrates how to mount the AFP volume fileserver.example.net/sharedDocs/ at the mount point /mnt/shared and getting prompted for the password for user user123:

mkdir /mnt/shared
mount_afpfs afp://user123:[email protected]/sharedDocs/ /mnt/shared

This example shows the correct URL format for mounting the volume Public Data from the AFP server backupserver as a guest user:

mkdir /mnt/public
mount_afpfs "afp://;AUTH=No User Authent@backupserver/Public Data" /mnt/public

Note: The afp URL must be enclosed in quotes to prevent the shell from misinterpreting the spaces.

The following illustrates how to use a username of “john.doe” and a password of “p@ssw0rd!” to mount fileshare from datahub.local at the mount point /mnt/files:

mkdir /mnt/files
mount_afpfs afp://john.doe:p@@[email protected]/fileshare/ /mnt/files

EXIT STATUS

The mount_afpfs utility exits 0 on success, and >0 if an error occurs.

SEE ALSO

afpc(1), afpfsd(1)