Home > Articles

The File System—Where Did Everything Go?

Mac OS X radically changes the way that Mac users interact with their files by imposing structure on a system that previously allowed a user to delete just about every file and folder on his hard drive before complaining. For those of you who have been using the Mac OS for 15 years, this change might come as an unwelcome surprise. Interestingly, Windows 2000/XP and Linux users are likely to be more accustomed to these restrictions already.

The goal of the OS X project is to provide system stability and ease of use to as wide a range of users as possible. To do this, Apple created sets of directories that must exist on each Mac OS X installation. This produces consistency across different copies of the operating system, and makes it simple for application installers to choose the appropriate place for storing files. Users cannot modify the system-level directories or move them out of their default location. Anyone with experience using Mac OS 8 or 9 will, at one point in time, have installed a piece of software only to ask "Where in the world did that file just go?" Under Mac OS X, you'll know.

The "Computer Level" of the File System Hierarchy

Like the My Computer icon in Windows, Mac OS X provides a topmost view of the storage devices accessible to the machine. You can still see your drives mounted on the desktop, but you can also access them by looking at the Computer view of your system. Figure 3.2 shows a Finder window that is viewing the top level of the system.

Figure 3.2 Mac OS X provides access to your drives and network within a Finder window, as well as on the desktop.

In Figure 3.2, there are three icons visible: Network, Mac OS X, and Mac OS 9.x. Within these three locations are all the files that are located on my system. Any additional FireWire or USB drives that are plugged into the system will appear in this location, as well as being mounted directly on the desktop.

The purpose of the hard drive icons should be obvious: to navigate the file system just as you would in Mac OS 8/9 or Windows. The Network icon, however, might require a bit of explanation.

Network Icon

The Network icon will be used on clustered Mac OS X installations to provide a central point of access to multiple servers, shared applications, and other network resources. In its current incarnation, it serves little purpose but to confuse the user. Mounted AppleShare volumes cannot be found within the Network directory, nor can you browse the available servers from this location. Later in the book you'll learn about a Windows-compatible file sharing tool called Sharity, which allows browsing of Windows shares within Network, but until this feature is better fleshed out by Apple, its practicality for the home user is debatable.

NOTE

Linux and Unix users might recognize the Computer level of the file system as being the same as the root level of a Unix file system. In reality, the root level starts with the Mac OS X boot disk—all other volumes use mount points below that volume (under the /Volumes directory). The Computer view of the file system is an artificial construct created by Apple to provide a top-level view of all resources available on the computer—similar to My Computer on Windows.

The Top-Level Mac OS X File System

When you open your Mac OS X boot drive, you should see a collection of permanent folders, similar to those in Figure 3.3. These directories contain all the preinstalled applications, utilities, and configuration files for your system. This will be your starting point of accessing most of the functions of your system.

Figure 3.3 The Mac OS X top-level file system contains several permanent folders.

As a normal Mac OS X user, you cannot modify these folders by moving, renaming, or deleting them. In addition, you cannot create new folders at this level of the drive. Don't worry too much about this. If you really want to create a new folder, there are ways to do it by using the root user account. You can also create folders and files within these locations if necessary.

Applications

The Applications folder contains all the preinstalled Mac OS X applications, such as TextEdit, Mail, QuickTime Player, and many others. Any application located within this folder will be accessible to any user on the system. If you're installing an application that should be accessed by only a single person, it might make more sense to store the application within the user's home directory (home directories will be covered shortly).

Perhaps more interesting than the applications in the Applications folder is the Utilities folder also located within. The Utilities folder contains tools necessary to set up your printers, calibrate your display, and other important tasks.

CAUTION

The Utilities folder can be modified by the default Mac OS X user. You can move, rename, or delete the folder if you'd like, but problems might arise. For reasons beyond explanation, Apple hardcoded the location of the Print Center into the system. When you attempt to print from Mac OS X, if Print Center cannot be located in the Utilities folder, it will not be launched. If you must rename your Utilities folder, you can manually start Print Center to complete any pending print jobs. This problem is fully described in Apple's TIL: http://til.info.apple.com/techinfo.nsf/artnum/n106265.

This problem might affect other applications automatically launched from the Utilities folder as well.

Library

The Library is a new addition to the Mac OS file system, and demonstrates the modular construction of the OS X system. Although is does not have a strict definition, you can think of the Library as a storage location for system-wide application preferences, application libraries, and information that should be accessible to any user. Figure 3.4 shows the contents of the Library folder on a clean Mac OS X installation.

Figure 3.4 The Library provides applications with a system-wide information storage area.

Some of these folders are used by applications to data such as preferences, whereas others hold printer drivers or other system additions made by the user. The default Library folders you'll find upon installation include:

  • Application Support—Contains files that are used by, but are not necessarily part of, an application. For example, the StuffIt engine is used globally by several compression utilities. Rather than having multiple copies of the engine for each program, a single copy of the engine is located in the Application Support folder.

  • Audio—Contains application or user-added sounds and plug-ins for the Mac OS X audio system.

  • Caches—Stores cached network information.

  • ColorSync—Stores ColorSync output device profiles as well as scripts to work with ColorSync information. Mac OS X includes a large number of AppleScripts that can be used immediately, including the ability to mimic the color settings of a typical PC monitor.

  • Desktop Pictures—Although desktop pictures can be loaded from any picture file, the Desktop Pictures directory provides a central storage area for all users to access picture files.

  • Documentation—If a third-party application installs documentation beyond traditional program helps, it should automatically be added to this folder.

  • Fonts—User-installed fonts can be added to the Fonts folder.

  • Image Capture—Mac OS X includes an extensible utility for retrieving images from digital cameras and other forms of digital media. This folder contains scripts that can automatically crop images or create Web page galleries.

  • Internet Plug-Ins—Rather than multiple browsers needing multiple copies of the same plug-in, or multiple users each needing a copy, the Internet Plug-Ins directory stores a single copy, accessible by any program that needs them.

  • Java—Java is an integral portion of Mac OS X. If there are Java class libraries that should be available to anyone using the system, they can be stored in the Java folder.

  • Logs—Log files generated by user-level services, such as file sharing are stored here.

  • Modem Scripts—The scripts necessary to initialize all the Mac OS X-supported modems are stored here. These scripts are simple text files that can easily be modified to work with unlisted modems.

  • Perl—Perl module information is stored within the Perl directory. Users should never need to manually update the contents of this folder.

  • Preferences—System-wide preference files. Because Mac OS X supports multiple users, each user should have his own preference file (located in his home directory). This folder contains preferences that are global; that is, across all users.

  • Printers—Drivers and utility software to manage third-party printers. Printer page description files can also be found here.

  • Receipts—When an application uses the Apple installer to copy files to the system, it leaves behind a .pkg (package) file that contains a complete list of all the files that were installed on the system and where they are located. This list can be read by opening the Installer application (double-click the .pkg file) and choosing Show Files from the Edit menu.

  • Screen Savers—Mac OS X includes its own screen saver engine. Within two weeks of the OS X release, more than 30 new screensaver modules were written. To add a new screen saver, just download the module and place it in this folder. It will be accessible by all user accounts on the system.

  • Scripts—A number of useful AppleScripts are stored in the Scripts folder. Everything from Finder to e-mail automation is included.

  • StartupItems—If a StartupItems folder doesn't exist on your system, you can create one. Any properly configured services will be executed from this location automatically. Note: This is not to be used in the same manner as the Startup folder on Mac OS 9. Applications placed here will not start when the computer is booted.

  • User Pictures—In Mac OS X 10.1, Apple returned to a graphical login screen, similar to the multiuser interface in OS 9.x. To add custom pictures for all users to choose from, place them here.

  • WebServer—CGIs (executable programs designed to work with a Web browser), and HTML documents are stored here. These can be used to build an industrial-strength Web server.

Keep in mind that if you plan to run a system with multiple user accounts, these folders affect all users on the system. For example, if you purchase a screen saver module for yourself, putting it in the Screen Savers folder gives access to all users. To restrict access to a single account, you'll have to install directly into your home directory, discussed shortly.

TIP

If your computer is being used as a personal workstation, it's best to leave the Mac OS X installation as "untainted" as possible. Almost all the items contained in the Library folder can also exist within your home directory. As you'll soon learn, your home directory is yours to configure however you see fit. Keeping system-wide configuration as simple as possible helps to make backing up and restoring a system very straightforward.

System

Next up on the list is the Mac OS X System folder. By default, the System folder contains one other folder, called Library. This is a more specific version of the same Library folder that contains the Fonts folder and other resources. Within the System's Library folder are contained the components that make up the core of the Mac OS X experience. Even though it is possible to perform some interesting hacks to the operating system, these files and folders should not be changed unless you are aware that any modifications you make could result in your computer becoming unbootable.

Users

The Users directory is probably the most interesting and important addition to the Macintosh file system. Although it is present in Mac OS 9, the multiuser capability pales in comparison to what is available under Mac OS X.

Mac OS X is based on an underlying Unix operating system. Within Unix, each file and folder belongs to a specific user and group. The owner of a file is exactly what it sounds like—the person to whom that file belongs. If you create a file, you own it. As the owner, you have the right to decide whether you want other people to be able to view it or edit it. A file or directory's group is similar to the owner, but whereas an owner is a single person, a group can consist of many different people.

For example, assume that you (Joe) are working with team members on an annual budget report. The members of the team who should be able to read the file are Betty, Bob, and Sue. Because there can be only one owner, Betty, Bob, and Sue can be given access to the file by assigning them to a group, such as ReportReaders, and then allowing ReportReaders the ability to read the files.

In Mac OS X, there is a default group named Staff that is shared between all accounts on the system. This makes it very easy to share a file between all the accounts on the system. If you'd like tighter control for limiting access to smaller groups of people, you can do that as well—with a little bit of work. Chapter 24, "User Management," discusses the use of user and group permissions from the BSD command line and using Mac OS X's graphical tools.

There is another possibility for allowing multiple people to have access to a single file: granting access to the "world." In the event that everyone should be able to read a file, you can also grant access to anyone. This is the typical mode of operation for the traditional Mac operating system—everyone has access to everything.

These three attributes for allowing access to a file (owner, group, and world) are controlled via three sets of permissions:

  • Owner Permissions— Also called user permissions, these control whether a file's owner can read, write, or execute a file or application.

  • Group Permissions—Group permissions control read, write, and execute access for members of the group that is assigned to the file. If only the owner should have access to the file, the group permissions can be set to "none."

  • World Permissions—Permissions that affect everyone else; that is, those not in the file's group and not the owner. If a file has world read/write/execute access turned on, anyone with access to the system will be able to edit or delete the file.

NOTE

The owner of a file can always change the permissions that are associated with that file—even if they've turned off read or write access for themselves. Why would a file's owner want to shut off the ability to read or write his or her own file? Have you ever accidentally deleted a file on your system? If so, you already know why.

Of the three permissions that can be set for the owner, group, or world, the read and write attributes should be obvious. They control the capability to read from files and write to them. The execute attribute controls whether a file should be capable of being launched by someone on the system. Some applications should be accessible by only certain users, and this attribute provides a means of selectively enabling a program to execute in the same way you can enable reading or writing.

NOTE

As mentioned earlier, Mac OS X does not allow normal user accounts the capability to modify the folders at the top level of the hard drive. This is because those folders are owned by an account called the root or super-user account. Although it's tempting to use the root account to gain complete control over the system, it's also highly dangerous. For this very reason, Apple has disabled the root account in Mac OS X. Enabling the account will be covered, but isn't recommended unless you're comfortable making changes that could affect your system's ability to boot.

The Home Directory

So, the system allows users to own their own files and provides a means of controlling other users' access to these files—what does that have to do with the Users directory that we're discussing? The Users directory contains the home directories of all of the users on the machine. A user's home directory can be considered that user's workplace. It is hers, and hers alone. Files and folders that are stored within a user's home directory are protected from other users.

If you've been a Mac user for a long time, you should start to think of your home directory as the place where you can make all your modifications to the folder arrangement and structure. Your home directory is the start of your personal area on Mac OS X. You can add documents, applications, fonts, screen savers—just about anything you can think of. Best of all, no one can mess with your configuration; conversely, you can't mess with anyone else's!

Within the Users directory are directories for each of the users on the system—these are the home directories themselves. Your directory will be named using the short name that you chose when you created your Mac OS X user account. Apple has created several default folders in your home directory, as shown in Figure 3.5.

Figure 3.5 The home directory is filled with several default folders.

    Desktop—The Desktop folder is much like what it always has been: a folder that contains everything that shows up on your desktop. In older versions of the Mac OS, this folder is invisible unless you are connecting to a remote Macintosh AppleShare server, in which case you could see the remote machine's Desktop folder. In Mac OS X, the Desktop folder is always visible in your home directory.

    Documents—A generic store-all location for any documents that you create. This is just a recommended storage location to help organize your files.

    Library—The Library folder is the same as the top-level Library folder and the Library folder within the System folder. Within the directories in this directory, you can store fonts, screen savers, and many other extensions to the operating system.

    Movies—This is another generic storage location where you can keep your iMovies and other media.

    Music—A generic location for storing your MP3s and various audio files.

    Pictures—A generic location for storing pictures. As with the other storage location, these are just suggestions for you to use. Some software might default to the appropriate location for the file type it is creating, but there's nothing stopping you from storing your files elsewhere.

    Public—If you plan to share your files over the network, you can do so by placing them in the Public folder and activating file sharing within the Sharing System Preferences panel. This will be discussed in Chapter 9, "Network Setup." Inside the Public folder is another folder called Drop Box. Other users can place items inside your drop box, but they cannot open the Drop Box folder itself. A small down arrow is located at the lower-right corner of the Drop Box icon to identify it visually.

    Sites—The Sites folder contains your personal Web site. Unlike Mac OS 8/9, which allows a personal site to be located anywhere, Mac OS X uses the Sites folder. This small sacrifice in flexibility is easily overlooked when you consider that each user's personal Web site can be served simultaneously.

TIP

The top-level Library folder, the System folder's Library folder, and the Library folder in the user's home directory are all similar. Each can hold components that are used by other parts of the operating system.

The operating system evaluates these in the order of System Library, top-level Library, and then the Library in each user's folder. To keep files as consolidated as possible, it's best to store components in your home Library folder. If there are items that should be accessible to all of the operating system's users, place these within the top-level Library.

You should never need to change the contents of the System folder.

Even though Apple has been kind enough to include specific folders for different file types, feel free to do anything you'd like with your home directory. The only folders that should not be modified are the Desktop and Library folders. These are critical to system operation and must be maintained.

NOTE

By default, a user can access only the Public and Sites folders within another user's home directory. Other folders appear with a red minus symbol in the lower-right corner. This indicates that no access is available to that location.

InformIT Promotional Mailings & Special Offers

I would like to receive exclusive offers and hear about products from InformIT 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 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 information@informit.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 InformIT. 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.informit.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