Publishers of technology books, eBooks, and videos for creative people

Home > Articles > Apple > Operating Systems

This chapter is from the book

Using Apple Filing Protocol

Apple Filing Protocol (AFP) has been the default file-sharing protocol for Mac OS X and its predecessors for quite some time. As Apple moves forward with an ever-widening set of options when dealing with permissions, it is important to understand the basics of POSIX permissions and their role in Mac OS X and Mac OS X Server.

Understanding POSIX Permissions with AFP Share Points

When you share files over AFP, you should understand the POSIX permissions model. In the POSIX permissions model, permissions depend on whether an item is new or a copy of an existing item.

Here’s the easy part: When you copy an item within a single volume, that item always retains its original ownership and permissions. In contrast, when you create a new item on a mounted volume, or copy an item from one volume to another volume, Mac OS X and Mac OS X Server use the following rules for ownership and permissions for the new file or folder:

  • The owner of the new item is the user who created or copied the item.
  • The group is the group associated with the enclosing folder; in other words, the newly copied item inherits its group from the enclosing folder.
  • The owner is assigned read and write permissions.
  • The group is assigned read-only permissions.
  • “Others” is assigned read-only permissions.

The variable that controls the permissions for newly created files is called the umask (changing the umask from the default of 022 is outside the scope of this book). Under this model, if you create an item in a folder in which the group has read/write permission, the item will not inherit that permission. If you want to let other group members edit the new item, you must change its permissions manually, using the Finder’s Get Info command, or using chmod in the command line. This is one reason you may decide to use ACLs.

Setting Access to Share Points and Folders

Once you’ve created a share point and determined the protocols you will use, you can begin to address levels of access within that share point. You need to consider POSIX privileges (ownership and permissions) as well as file-system access permissions (set via ACLs), both of which were discussed in Chapter 2, “Authenticating and Authorizing Accounts.” Using this very flexible system, you can apply access settings to any folder within your share points through inheritance or explicit support.

To configure access settings for share points or folders, use the Permissions pane when viewing that share point or folder in Server Admin. The standard POSIX settings are listed as Owner, Group, and Others in the bottom half of the pane; access settings using ACLs are set in the top half. You can use Server Admin to create and edit an ACL for a folder, but not for a file. Remember that POSIX privileges always exist for every file and every folder.

To see the result of access-control settings, you can use the Effective Permission Inspector, available from the Action pop-up menu (labeled with a gear and a down arrow) in the lower-left corner of the Permissions pane.

Enabling Service Access with Server Preferences

You can use Server Preferences to quickly enable the default file-service protocols and share points. If you enable file sharing during your initial server setup, regardless of how you choose to manage your users and groups, your server will automatically offer AFP and SMB services, with a set of preconfigured share points. Here is a list of the share points and the paths to the share points:

  • Users (/Users)
  • Groups (/Groups)
  • Public (/Shared Items/Public)

You can easily add another share point, remove a share point, and edit basic access to the share point for network user accounts with Server Preferences.

Removing and Adding Share Points with Server Preferences

It is easy to remove or add a share point with Server Preferences, but Server Preferences doesn’t let you create a folder. If you want to create a new folder to use for a share point, you must first use the Finder, Server Admin, or command-line tools to create a folder on your server.

To keep the example simple, rather than create another folder to share, you will use Server Preferences to remove the Public share point, then add the Public share point again.

  1. On your Mac OS X computer, open Server Preferences and authenticate to your server with Local Administrator credentials.
  2. Click File Sharing.
  3. Select the Public share point.
  4. Click the Remove (–) button and verify that you want to remove the share point.

    You have just removed the Public share point. It is no longer accessible over AFP or SMB file sharing.

  5. Add Public as a share point again.

    Click the Add (+) button.

  6. Navigate to /Shared Items/Public on your boot disk, then click Share.

    Note that this enables the share point for both AFP and SMB access.

Editing Share Point Permissions with Server Preferences

You can adjust basic access to your share point with Server Preferences.

You have the choice of allowing read and write access to the share point for all users, or specifying a limited list of network user and group accounts. You can also enable or disable guests to have read-only access. Keep in mind that this enables and disables guest access for both AFP and SMB.

If you click Edit Permissions for a share point, you will see the following pane, which displays only network users and groups. When you select “Allow read and write access for,” “Only these registered users and groups,” this adds an allow ACE for the users you select, followed by a deny ACE for the group named Workgroup (all network users), to the ACL of the folder.

Note that there is a checkbox labeled “Allow guests read-only access.” This checkbox affects both AFP and SMB services, so when you use Server Preferences to enable guest access for AFP, you also enable guest access for SMB.

Because Server Admin gives you much more flexibility in creating and enabling file-sharing services, the rest of this chapter focuses on using Server Admin.

Creating and Enabling Service Access with Server Admin

Server Admin offers you more options in configuring file-sharing services than Server Preferences.

The General and Access settings you configure for each service in Server Admin are part of the basic configuration steps you need to take regardless of which sharing protocols you decide to use. However, a few additional configuration settings are available for each share point from the pop-up menu in the Protocol Options pane in Server Admin. Here is the General pane under Settings for the AFP Service.

The Login Greeting field lets you specify a message to be displayed when a user connects. The message appears even when a user connects to his or her home folder.

When you enable the AFP service, users of Mac OS X computers will see your server’s Computer name (as defined in the Sharing preference) in the Finder sidebar by default. Here is Server 17’s Sharing preference:

Here’s what the Finder looks like for a Mac OS X computer on the same network as the Mac OS X Server with the AFP service enabled.

Controlling Access

AFP gives you the option to use either Kerberos or standard authentication as a method of authenticating users. If you choose Any Method in the Authentication pop-up menu, AFP will first try to authenticate using Kerberos; if the connection cannot be established using Kerberos, it will use standard authentication.

Once the user is authenticated, file permissions control access to the files and folders on your server. One setting should be called out with respect to permissions: the Others permissions. When you set Others permissions, those permissions apply to everyone who can see the item (either a file or folder) who is neither the owner nor part of the default group. You need to understand how Others permissions combine with another feature, guest access. As the name implies, guest access lets anyone who can connect to your server use its share points. A user who connects as Guest is given Others permissions for file and folder access. If you give read-only access to Others on a share point that allows guest access, everyone on your network (and possibly the entire Internet) can see and mount that share point.

If a folder is buried deep within a file hierarchy where guests can’t go (because the enclosing folders don’t grant access to Others), then guests can’t use the Finder to browse to that folder. The Others permissions apply only to users who have been granted permission to see the enclosing folders but have not been granted permission to see that folder via their user and group settings.

Guest access can be very useful, but before you enable it, be sure you understand its implications in your permissions scheme.

Enabling Access

File ACLs control file-system access. Service ACLs (SACLs) control which service a user can access and provide an extra level of control when configuring your server. You can set SACLs per service or globally for the entire server. It is important to understand the ramifications when enabling SACLs across all services. Therefore, as a cautionary measure, it is best to enable SACLs per service to reduce the amount of confusion for your users.

Logging Activity

Are you concerned that a user is accessing items that he or she should not have access to? Are you getting complaints from your users that their documents are disappearing or that they can’t access things they should have access to? For troubleshooting these issues and more, logging is an invaluable resource.

AFP can keep two types of logs: the error log, which is always open by default, and the access log, which you must enable on the server using Server Admin (also used to view the logs). Enable the access log only when needed. Every action taken by a user is logged to this file, so it can become large very quickly and fill the available space in the file system. Logging all of these events for a busy server with a couple of hundred users can quickly result in a large log file that will be difficult to read through when attempting to diagnose the source of the issue. Alternately, you can configure the logging settings to save only certain events to the log, including Login, Logout, Open File, Create File, Create Folder, and Delete File/Folder. Another disk space–saving feature available to you is log archival. This will save (and compress) each log file after the specified period of time.

Troubleshooting and Monitoring Usage

In addition to the logs, Server Admin gives you graphical information about the current state of your server. You can view the number of connections, which users are currently connected, what protocol they used to connect, and how long they have been connected. In addition, the Graphs pane gives you a historical view of the amount of overall activity that the server has seen recently.

Monitoring server usage is a valuable tool to keep track of workflow. You can view graphs and watch for usual traffic patterns, usage spikes, and low-usage periods that you could use to plan backups or perform server maintenance.

Peachpit Promotional Mailings & Special Offers

I would like to receive exclusive offers and hear about products from Peachpit and its family of brands. I can unsubscribe at any time.

Overview


Pearson Education, Inc., 221 River Street, Hoboken, New Jersey 07030, (Pearson) presents this site to provide information about Peachpit products and services that can be purchased through this site.

This privacy notice provides an overview of our commitment to privacy and describes how we collect, protect, use and share personal information collected through this site. Please note that other Pearson websites and online products and services have their own separate privacy policies.

Collection and Use of Information


To conduct business and deliver products and services, Pearson collects and uses personal information in several ways in connection with this site, including:

Questions and Inquiries

For inquiries and questions, we collect the inquiry or question, together with name, contact details (email address, phone number and mailing address) and any other additional information voluntarily submitted to us through a Contact Us form or an email. We use this information to address the inquiry and respond to the question.

Online Store

For orders and purchases placed through our online store on this site, we collect order details, name, institution name and address (if applicable), email address, phone number, shipping and billing addresses, credit/debit card information, shipping options and any instructions. We use this information to complete transactions, fulfill orders, communicate with individuals placing orders or visiting the online store, and for related purposes.

Surveys

Pearson may offer opportunities to provide feedback or participate in surveys, including surveys evaluating Pearson products, services or sites. Participation is voluntary. Pearson collects information requested in the survey questions and uses the information to evaluate, support, maintain and improve products, services or sites; develop new products and services; conduct educational research; and for other purposes specified in the survey.

Contests and Drawings

Occasionally, we may sponsor a contest or drawing. Participation is optional. Pearson collects name, contact information and other information specified on the entry form for the contest or drawing to conduct the contest or drawing. Pearson may collect additional personal information from the winners of a contest or drawing in order to award the prize and for tax reporting purposes, as required by law.

Newsletters

If you have elected to receive email newsletters or promotional mailings and special offers but want to unsubscribe, simply email ask@peachpit.com.

Service Announcements

On rare occasions it is necessary to send out a strictly service related announcement. For instance, if our service is temporarily suspended for maintenance we might send users an email. Generally, users may not opt-out of these communications, though they can deactivate their account information. However, these communications are not promotional in nature.

Customer Service

We communicate with users on a regular basis to provide requested services and in regard to issues relating to their account we reply via email or phone in accordance with the users' wishes when a user submits their information through our Contact Us form.

Other Collection and Use of Information


Application and System Logs

Pearson automatically collects log data to help ensure the delivery, availability and security of this site. Log data may include technical information about how a user or visitor connected to this site, such as browser type, type of computer/device, operating system, internet service provider and IP address. We use this information for support purposes and to monitor the health of the site, identify problems, improve service, detect unauthorized access and fraudulent activity, prevent and respond to security incidents and appropriately scale computing resources.

Web Analytics

Pearson may use third party web trend analytical services, including Google Analytics, to collect visitor information, such as IP addresses, browser types, referring pages, pages visited and time spent on a particular site. While these analytical services collect and report information on an anonymous basis, they may use cookies to gather web trend information. The information gathered may enable Pearson (but not the third party web trend services) to link information with application and system log data. Pearson uses this information for system administration and to identify problems, improve service, detect unauthorized access and fraudulent activity, prevent and respond to security incidents, appropriately scale computing resources and otherwise support and deliver this site and its services.

Cookies and Related Technologies

This site uses cookies and similar technologies to personalize content, measure traffic patterns, control security, track use and access of information on this site, and provide interest-based messages and advertising. Users can manage and block the use of cookies through their browser. Disabling or blocking certain cookies may limit the functionality of this site.

Do Not Track

This site currently does not respond to Do Not Track signals.

Security


Pearson uses appropriate physical, administrative and technical security measures to protect personal information from unauthorized access, use and disclosure.

Children


This site is not directed to children under the age of 13.

Marketing


Pearson may send or direct marketing communications to users, provided that

  • Pearson will not use personal information collected or processed as a K-12 school service provider for the purpose of directed or targeted advertising.
  • Such marketing is consistent with applicable law and Pearson's legal obligations.
  • Pearson will not knowingly direct or send marketing communications to an individual who has expressed a preference not to receive marketing.
  • Where required by applicable law, express or implied consent to marketing exists and has not been withdrawn.

Pearson may provide personal information to a third party service provider on a restricted basis to provide marketing solely on behalf of Pearson or an affiliate or customer for whom Pearson is a service provider. Marketing preferences may be changed at any time.

Correcting/Updating Personal Information


If a user's personally identifiable information changes (such as your postal address or email address), we provide a way to correct or update that user's personal data provided to us. This can be done on the Account page. If a user no longer desires our service and desires to delete his or her account, please contact us at customer-service@informit.com and we will process the deletion of a user's account.

Choice/Opt-out


Users can always make an informed choice as to whether they should proceed with certain services offered by Adobe Press. If you choose to remove yourself from our mailing list(s) simply visit the following page and uncheck any communication you no longer want to receive: www.peachpit.com/u.aspx.

Sale of Personal Information


Pearson does not rent or sell personal information in exchange for any payment of money.

While Pearson does not sell personal information, as defined in Nevada law, Nevada residents may email a request for no sale of their personal information to NevadaDesignatedRequest@pearson.com.

Supplemental Privacy Statement for California Residents


California residents should read our Supplemental privacy statement for California residents in conjunction with this Privacy Notice. The Supplemental privacy statement for California residents explains Pearson's commitment to comply with California law and applies to personal information of California residents collected in connection with this site and the Services.

Sharing and Disclosure


Pearson may disclose personal information, as follows:

  • As required by law.
  • With the consent of the individual (or their parent, if the individual is a minor)
  • In response to a subpoena, court order or legal process, to the extent permitted or required by law
  • To protect the security and safety of individuals, data, assets and systems, consistent with applicable law
  • In connection the sale, joint venture or other transfer of some or all of its company or assets, subject to the provisions of this Privacy Notice
  • To investigate or address actual or suspected fraud or other illegal activities
  • To exercise its legal rights, including enforcement of the Terms of Use for this site or another contract
  • To affiliated Pearson companies and other companies and organizations who perform work for Pearson and are obligated to protect the privacy of personal information consistent with this Privacy Notice
  • To a school, organization, company or government agency, where Pearson collects or processes the personal information in a school setting or on behalf of such organization, company or government agency.

Links


This web site contains links to other sites. Please be aware that we are not responsible for the privacy practices of such other sites. We encourage our users to be aware when they leave our site and to read the privacy statements of each and every web site that collects Personal Information. This privacy statement applies solely to information collected by this web site.

Requests and Contact


Please contact us about this Privacy Notice or if you have any requests or questions relating to the privacy of your personal information.

Changes to this Privacy Notice


We may revise this Privacy Notice through an updated posting. We will identify the effective date of the revision in the posting. Often, updates are made to provide greater clarity or to comply with changes in regulatory requirements. If the updates involve material changes to the collection, protection, use or disclosure of Personal Information, Pearson will provide notice of the change through a conspicuous notice on this site or other appropriate way. Continued use of the site after the effective date of a posted revision evidences acceptance. Please contact us if you have questions or concerns about the Privacy Notice or any objection to any revisions.

Last Update: November 17, 2020