TITLE
    AppleShare: How Privileges are Stored
Article ID:
Created:
Modified:
30635
7/28/98
10/31/00

TOPIC

    This article explains how Apple Share file sharing privilges are stored and how to move them to another computer.


DISCUSSION

    Two files are key to maintaining privileges on the file server, the Users & Groups Data File and the invisible AppleShare PDS files. This article explains how they work together.

    AppleShare PDS and PDF files

    Every user and group that you create is automatically assigned a unique ID number. Similarly, every folder has its own unique ID number. AppleShare uses these ID numbers--not the names of the Users, Groups, or Folders--to determine who has access to the various folders on the server.

    Each volume on the server has a file that maintains the access privileges of the folders on that volume. For standard read/write volumes, the file is stored at the root level of the volume. It is an invisible file called "AppleShare PDS". (PDS stands for Parallel Data Structure.)

    The file is invisible so it won't be moved or renamed accidentally. If the file is moved or renamed, a new one will be created, and all privileges for that volume would be reset to the default (administrator is owner, no one else has privileges).

    For read-only volumes such as CD's, the file that stores the privileges is located in the startup volume's System Folder: Preferences: AppleShare IP Preferences: Access Privileges folder; and will be called '<name of CD>.PDF', for example "AppleShare 6.0.PDF". For Personal File Sharing, these files are stored in the volume's System Folder: Preferences: File Sharing folder; and follow the same name structure. These PDF files work the same as the PDS files; if they are moved or renamed, a new one will be created, with default privileges.

    Because the PDS files use unique numbers to identify the users, groups, and folders, the information in the PDS file will be invalid if these numbers change. As examples:

    If you created a new Users & Groups data file, with all the same names and groups as the original, and substituted it for the original, privileges would be lost because the ID numbers would no longer match.

    Similarly, if you did a Finder-copy of all your shared data to another hard drive, those copied folders would no longer have privileges (even if you also moved the PDS file over to the new volume), because the copied folders have different ID numbers associated with them. The information in the PDS file would be invalid, and privileges would be reset to the default.

    Keeping U&G Data File and PDS files in sync

    When File Services are starting up (and you see "this may take a few minutes" dialog), AppleShare is checking the information in the PDS and PDF files, and the data in the Users & Groups Data File, and the folders on the volume, to make sure all information is still valid.

    Checking the privileges at start up can take some time, depending on the number of folders that need to be checked, and whether or not you're using explicit or inherited privileges at the server. See the section on Explicit vs. Inherited privileges for more details.

    If it finds discrepancies, such as a single user no longer exists in the Users & Groups data file (such as what might happen if you restored that file from a backup), it will return that folder to default privileges. All privileges are lost when none of the information is found to be valid, which might happen if you do a clean system install, and don't restore your Users & Groups Data File into place before starting up the file server.

    As a precaution when doing a clean install on the server, you can backup not only the Users & Groups Data File, but the PDS file for each volume on the server. If you should lose privileges at some point during the clean install process, you can restore the appropriate PDS backup file to its volume, and get privileges back.

    In order to back up the PDS files, you must first make them visible. It is recommended if you have AppleShare IP 5 or 6 to use the AppleShare IP First Aid Tool. This utility will allow you to backup the Users & Groups Data File and AppleShare PDS File, it creates an AppleShare IP First Aid file that can be used for restoring. You can also make AppleShare PDS Files visible so they can be backed up with ASIP First Aid.


    AppleShare IP First Aid 6.2 will work without AppleShare IP installed, allowing one to backup or move shared items and privileges from Mac to Mac. This is an unsupported utility and users should backup the AppleShare PDS and Users & Groups Data File in case difficulties do arise. You can get ASIP First Aid from Apple's Software Updates at: http://asu.info.apple.com/swupdates.nsf/artnum/n11164


    Without the AppleShare IP First Aid Tool this can be done with a disk utility, such as ResEdit, Norton Disk Editor or File Buddy. These applications will let you view the "Finder Info" for the files, and turn off the "invisible" flag. You'll also need to make sure that you keep them straight, so you know which PDS file goes with which volume. You might do that by placing the backup files in a folder named after the volume it came from.

    Moving file sharing services to a different computer

    If you want to move all file sharing services to a different computer, you'll need to move the Users & Groups Data File from the server to the new computer (replacing the one that's already there in the Preferences folder), restart, and make sure its recognized before you begin to move the shared data over.

    When moving the shared data, you need to do so in a way that will preserve access privileges. Backing up and restoring with a utility like Retrospect is one way to go (AppleShare must be running during both the backup and restore process). Or you can use the Web & File Admin's "Duplicate Folder" command (which also maintains privileges) to copy all folders to be moved to an external disk, then just move that external disk over the new server. You could then use the "Duplicate Folder" command to move the data from the external to an internal disk again.

    Troubleshooting Difficulties with File Sharing Starting Up

    PDS files can sometimes get corrupted, which can have various symptoms, the most common is the server stays in "starting up" mode forever. Other symptoms might be that your share points keep getting unshared, or privileges don't change as expected.

    This can happen with Personal File Sharing as well as with AppleShare File Servers. Difficulties starting up could also be an indication of corruption in the Users & Groups Data File, but this is not as common.

    If you're experiencing such difficulties, keep the following in mind:

    • Every volume on the desktop, except for floppy disks, is going to have an invisible PDS file on it, whether you share it or not.
    • Check for available free space on every volume on desktop; if there's not enough free space on the disk to create the PDS file, the startup process may hang. A good rule of thumb is to keep 10% of a drive's capacity free. For a 1GB drive, this means 100MB should be free. This also helps accommodate temporary files that need to be created, such as spool files created when printing. The bare minimum for the PDS files is around 300K.
    • If you have a current backup of the Users & Groups Data File, you can try swapping it out. This should cause you no loss of data, if you do it right (drag existing U&G Data File to desktop, drag backup to System Folder: Preferences, then restart the computer).
    • If you suspect the fault is with PDS file corruption, check the PDF files (which hold the access privileges for any CD that's inserted into the server). With AppleShare IP, they're in the System Folder: Preferences: AppleShare IP Preferences: Access Privileges folder. With Personal File Sharing, they're in the System Folder: Preferences: File Sharing folder. Move those files to another location, and see if File Sharing starts up.
    • If you're still having difficulty, try moving the AppleShare PDS files to another location one by one, to see if you can determine which file is causing the issue. Do so by making the files visible first, then moving the files to a folder, appropriately named to represent the volume the file came from. If you find out they're not the culprit after all, you can return them to their original location, and have your privileges restored.
    • Another method is to simply unmount volumes from the desktop, then try starting up file sharing. Of course you can't do this with the startup disk.


Document Information
Product Area: Apple Software; Communications-Networking
Category: AppleShare
Sub Category: AppleShare for Mac OS

Copyright © 2000 Apple Computer, Inc. All rights reserved.