10.4: Share an iPhoto library among multiple users

Sep 09, '05 08:44:00AM

Contributed by: elmimmo

Tiger only hintHere is yet another method for having one single iPhoto library used by several users with full privileges over the addition, modification and deletion of new photos and albums. Obviously, you only want to do this if you completely trust that those other users will not ruin your collections, and you make regular backups!

This hint is, IMHO, the fastest, cleanest, and most system-friendly way of doing it. I cannot think of a single drawback, except for the fact that it is unfortunately only available to 10.4 users. That's because it uses a special kind of file and folder permissions introduced in 10.4: Access Control Lists (ACL). The summary description is that, by using ACL, you can let any user that does not own a file (or is not part of the group that owns the file) do whatever you want to let them do with it. Here's an introduction to what you can do with ACL.

Read on for the detailed walkthrough...

  1. Enable ACL on your file system. Open the Terminal application and type the following:
    sudo fsaclctl -p / -e
    Type just fsaclctl to learn more about the command.

  2. Create a new folder for the Library that all your users will share. Advanced users should be able to find a way to do this with their already created Library, but in order to simplify Terminal commands, I will create a new one. Create it in a place that all users can access, like /Users/Shared, for example. I will refer to the new folder as "iPhoto Library" in the next set of Terminal commands, but you can name it whatever you want. Note that in the Terminal, you must 'mark' spaces in folder names with backslashes, as shown in the examples below.

  3. Add one ACL rule for each user that must have full access to that Library:
    sudo chmod +a "UserName allow delete,chown,list,search,add_file,\
    add_subdirectory,delete_child,file_inherit,directory_inherit" \
    /Users/Shared/iPhoto\ Library
    [robg notes: I had to break the line into three rows for narrower display here. I tested it with a new folder and ACL enabled, and it should work via a copy and paste. But if you have any troublese with it, copy each bit into a text editor, remove the backslashes, and join the lines without any added spaces.]

    Repeat this command as many times as needed, once for each user you want to use the shared folder, changing UserName with the short username of each user. This translates to "add the new permission rule 'let user UserName do pretty much anything to the following folder and all future elements created inside' to the folder /Users/Shared/iPhoto Library."
Tada! That's it. There you have a new iPhoto Library that all those users can tinker with. Of course, you must log into each user and instruct iPhoto to use that library. If you use iPhoto 5, this hint explains that by holding Option/Alt when launching iPhoto, you are asked what new library you'd like to use (the old one will not be deleted; iPhoto will simply ignore it). Search macosxhints.com if you use other versions.

If you'd like to start with one of the pre-existing Libraries for one of the users, just make sure no user is using iPhoto, and copy all the contents of the old iPhoto library into the new one. Do not move them, since the ACL inheritance only works for new items created inside the new library .... besides, you do not want to try most any potentially dangerous macosxhints.com tip without recently-backed-up originals!

Merging old iPhoto libraries into this new library is more complicated and belongs to another hint. Search MacOSXHints for assistance. Note that iPhoto will be smart, and will not let two or more users tinker with the shared iPhoto library at once through fast user switching. Only one of those users will be able to open iPhoto.

[robg adds: I haven't tested this one yet, but this seems to be a nearly ideal solution for sharing not only an iPhoto library, but an iTunes library or any other folder that you'd like to have "globally usable."]

Comments (46)


Mac OS X Hints
http://hints.macworld.com/article.php?story=20050904072808460