Submit Hint Search The Forums LinksStatsPollsHeadlinesRSS
14,000 hints and counting!

10.4: Share an iPhoto library among multiple users Apps
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."]
    •    
  • Currently 2.43 / 5
  You rated: 2 / 5 (14 votes cast)
 
[192,232 views]  

10.4: Share an iPhoto library among multiple users | 46 comments | Create New Account
Click here to return to the '10.4: Share an iPhoto library among multiple users' hint
The following comments are owned by whoever posted them. This site is not responsible for what they say.
10.4: Share an iPhoto library among multiple users
Authored by: lewsmind on Sep 09, '05 10:13:03AM
This is definitely easier than the previous workaround in 10.3. Although the previous workaround still works in 10.4 I will have to give this a try.

How is it that I hadn't heard of ACL yet? It seems like a Godsend.

Anyone know if this will work with Address book?

[ Reply to This | # ]

I can't believe going through such complications!!!
Authored by: treck on Sep 11, '05 01:08:36PM

Just put your iphoto library on a shared space, either a drive or partition which is ignoring permissions. Launch iphoto under each user with the option key held, and select the library....

---
treck



[ Reply to This | # ]
I can't believe going through such complications!!!
Authored by: sjk on Sep 11, '05 08:47:50PM

And if that works you should also be able to store iPhoto libraries on disk images that ignore permissions instead of separate drives/volumes.

Lots of useful tips here are begging for simplification. :-)



[ Reply to This | # ]
iTunes
Authored by: macgruder on Sep 09, '05 11:05:22AM

It seems that this doesn't work in iTunes. I've tried it. I have no idea why, but I'm guessing the Apple have hobbled certain 'sharing' features when it comes to iTunes. Seems pointless, as the alternative of using aliases, cronjobs/startup scripts easily gets around the problem.



[ Reply to This | # ]
iTunes
Authored by: macgruder on Sep 09, '05 11:09:15AM

Or, perhaps I moved the library rather than copying it. I wonder! Perhaps someone else could give it a try.



[ Reply to This | # ]
Works just fine here....
Authored by: germ on Sep 09, '05 04:08:34PM

both when moving the whole iTunes wolder as well as only the iTunes library.

Have not verified with iTunes 5, though.



[ Reply to This | # ]
Works just fine here....
Authored by: alani on Oct 20, '05 05:05:29PM

Hmm. What, exactly, did you share?
It's easy enough to move the "iTunes Music" folder (the one that contains the mp3 files) to /Users/Shared and use chmod to change the regular old Unix modes. The, each user, in iTunes, chooses the new location in iTunes...Preferences...Advanced .

So now users can play and add music to that folder. Great.

The problem is that if User A adds music, it shows up in his iTunes but not in User B -- the Library (not the folder) needs to be updated. User B would need to locate the new music in Finder and import it again into iTunes.

The real trick is to share the files "iTunes Library" and "iTunes Music Library.xml"



[ Reply to This | # ]
Re-check ACL after disk cloning
Authored by: elmimmo on Sep 09, '05 11:41:20AM

A post scriptum comment:
Backup utilities such as Disk Utility's Restore or Carbon Copy Cloner do not seem to copy ACL rules, or maybe it is that last time I used CCC the destination hard disk did not have ACL enabled. Whatever the case, if you clone your hard drive to another hard drive and iPhoto does not open the shared library anymore, just redo the hint (that is, create a new library and copy -not move- the contents of the old one on the new one).

I am in the process of checking if this works with iTunes and Address Book, although I pressume the later might have problems with what it thinks is the current user's card. I'll report when I know.



[ Reply to This | # ]
10.4: Share an iPhoto library among multiple users
Authored by: jhales on Sep 09, '05 11:55:39AM

It has been a while since I did it, so I might be forgetting something. But, if I recall correctly you don't need to even use ACLs to share an iTunes library. Just put your iTunes library in /User/Shared and then for each user specify that this folder is your iTunes folder. I've had that setup since 10.3 and it works fine for me and my wife to share our music across our personal accounts on our mac.



[ Reply to This | # ]
10.4: Share an iPhoto library among multiple users
Authored by: rhowell on Sep 09, '05 01:02:23PM

With this method you describe, you and your wife would not each be able to make changes to the iTunes library (write access). Sure, you'd each be able to listen to music (read access), but only the owner of the library could make changes.

If you find that indeed you both have write access, then something is not right.



[ Reply to This | # ]
10.4: Share an iPhoto library among multiple users
Authored by: macgruder on Sep 09, '05 01:52:52PM

Yes, I second this.

Whoever added a particular tune is the owner, and therefore only that person can change it. A way round this is to write a cronjob for root the updates all the permissions every 10 minutes or so. (You'll need to set up a group containing all the sharers). This is not perfect but has worked for me in the past.



[ Reply to This | # ]
10.4: Share an iPhoto library among multiple users
Authored by: david-bo on Sep 10, '05 10:10:22PM

Wouldn't just changing your umask take care of this issue?

---
http://www.google.com/search?as_q=%22Authored+by%3A+david-bo%22&num=10&hl=en&ie=ISO-8859-1&btnG=



[ Reply to This | # ]
10.4: Share an iPhoto library among multiple users
Authored by: elmimmo on Sep 11, '05 06:23:42PM

Yes, but that would affect all of your newly created files, not just the iPhoto Library. To those not knowing the "umask" sets what permissions new files are created with. Taking into account that by default OS X creates a new different group for each user account, you would need to set your umask to allow write access to all your files to all users, which not everybody wants (unless your tinkering goes further, which involves playing with Netinfo manager, chmod'ing and chown'ing preexisting files in your home folder, blah, blah… not for the faint of heart).



[ Reply to This | # ]
10.4: Share an iPhoto library among multiple users
Authored by: elmimmo on Sep 11, '05 06:25:33PM

Oops! I meant iTunes Library in "not just the iPhoto Library".



[ Reply to This | # ]
10.4: Share an iPhoto library among multiple users
Authored by: crispyking on Feb 02, '06 02:57:07AM

Yes, I use umasks to accomplish the same thing and it works great.

The trick is that Mac GUI Apps don't respect the shell's umask setting, so you need to add it to the .GlobalPreferences database by doing: 'defaults write -g NSUmask 2' There's a MacOSXHint for 10.3 (search for NSUmask).

It can actually be a good and secure thing to have a umask of 2 always (i.e. make things group writeable by default) if you have groups set up properly. Recent releases of OSX (since 10.3 I think) create a unique group for each user by default so a umask of 2 works great to keep a user's files private, and facilitates sharing in groups. Just change the group ownership of a directory and start using it for group projects and everything just works like you'd expect, and everyone in the group can write files.



[ Reply to This | # ]
umask, NSUmask, etc.
Authored by: sjk on Feb 02, '06 12:12:14PM
Just wanted to add that using "umask 2" and "NSUmask 2" doesn't guarantee files will always be created group writable.

Also, if a directory is group writable any member of its group can create/delete/rename files in that directory, but not necessarily modify them because of lacking explicit write permission. In that case you may need to change permissions of any preexisting files to be group writable.

An app might modify a write-protected file in a group-writable directory by renaming the original file, writing a new version, then deleting the original. That new version will normally be owned by the user running the app. Sometimes the new version will properly inherit permissions via umask but there are exceptions. Version control software like RCS can operate this way, relying on directories being writable rather than the individual files they contain.

The rules for traditional Unix-style directory and regular file permissions/ownerships are fairly easy to understand. What's tricky is getting them to properly behave and cooperate consistently, especially over entire filesystems. For example, the big limitation with umask is it's a global setting rather than being per-directory. ACLs can help but add more complexity and management issues.

Personally, I prefer managing a smaller number of group writable directories than a larger number of group writable files. If someone can't modify the file in a group writable directory I might tell them to make a copy of it, modify that, then replace the original with the copy instead of having to make the original file writable. And sometimes it's an advantage that the file ownership then changes to the user who last modified it. But most apps only care about file permissions when attempting modifications and ignore possibly more liberal directory permissions.

As I've written before, the original Unix permission scheme wasn't designed for scaling to handle the huge numbers of files/directories we manage nowadays yet we're still stuck using it.

[ Reply to This | # ]
10.4: Share an iPhoto library among multiple users
Authored by: elmimmo on Sep 09, '05 01:42:06PM
Just for the record, while trying to see if google had already indexed this hint, I saw that someone had already thought about this before me. I should have googled before writing the hint I guess. In any case, here is the another more descriptive way of explaining the same.

[
Reply to This | # ]
10.4: Share an iPhoto library among multiple users
Authored by: macgruder on Sep 09, '05 01:55:04PM

Although interestingly they don't insist that you copy the files. I wonder which is correct.



[ Reply to This | # ]
10.4: Share an iPhoto library among multiple users
Authored by: elmimmo on Sep 09, '05 02:02:02PM

Both are. Note that he ads +R to the command that adds the ACL. That means that he/she is adding that rule to the folder AND to each and every item contained in that folder, while I am only applying it to the folder (new items created in the folder will still inherit that rule, but existing one will not).

I knew about that one, and that's why I hinted that advanced users could find a way to reuse their existing libraries. However I think that doing whatever recursive action with original files is just begging for things to go wrong. Note that using +R will cause no harm at all, but your errors will.



[ Reply to This | # ]
10.4: Share an iPhoto library among multiple users
Authored by: elmimmo on Sep 09, '05 02:18:20PM

Excuse me, let me elaborate. He is FIRST moving the library folder (not what I insisted against: moving its CONTENTS into a new folder) and THEN applying the ACL to the ORIGINAL library folder and all its contents (by using the +R flag), and lastly placing a symlink in place of the original Library, so as not to need to instruct iPhoto where the new Library is.

Note that even with his/her method, moving an item into a folder which has an inheritable ACL rule will not make that moved item inherit the ACL rule. Still, his/her whole point is that you are neither copying nor moving anything into to library folder, but moving the whole folder, the ACL rules of which move with.

In any case, I again recommend against tinkering with original files in case you make a mistake.

PS: As you might have already noted in my comments, English is not my mother tongue and I guess every now and then I make grammar errors which I do not notice. Excuse me for that, and thanks, robg, for the nice editing ^_-



[ Reply to This | # ]
10.4: Share an iPhoto library among multiple users
Authored by: rhowell on Sep 09, '05 03:04:44PM

I don't think just anybody can add a tune, without write access to the iTunes Music Library XML file. The owner of the XML file never changes, and by default its read-only for non-owners.



[ Reply to This | # ]
SORRY!!!
Authored by: rhowell on Sep 09, '05 03:07:29PM

This comment belongs deeper inside the fourth discussion above. DOH!



[ Reply to This | # ]
10.4: Share an iPhoto library among multiple users
Authored by: elmimmo on Sep 09, '05 05:17:54PM

The thing is that the ACL rule has priority over traditional file ownership, group, etc permissions. If the ACL rule allows it, a user not owning the file and not having traditional write permissions can, in reality, bypass that limitation.

But, I tried with iTunes, and indeed, it does not seem to allow bypassing those. Since wether the user has true priviledges (through traditional permissions, ACL or whatever) cannot be decided by iTunes, but by the OS, IMHO Apple made iTunes check wether file ownership was coherent with the logged user before actually attempting to write the library xml file, refusing to even trying if the two did not match.

So, unfortunately, I cannot seem to use ACL rules to share one single iTunes Library, even though the user posting the last comment in <a hef=http://ad.hominem.org/log/2005/07/acl.php>that external hint</a> explaining too how to use ACL to share iPhoto libraries, claims that he tried with iTunes and succeded. :-?



[ Reply to This | # ]
10.4: Share an iPhoto library among multiple users
Authored by: elmimmo on Sep 09, '05 05:23:08PM

Ouch! I see, you were answering the user who claims that using ACL were not necessary, which makes my previous comment somewhat pointless :-/



[ Reply to This | # ]
What About Many Users View, But One User Edit?
Authored by: themacnut on Sep 10, '05 03:50:53AM

This is a nice hint to have multiple users be able to add to or edit an iPhoto album, but what if you want to have other users be able to view the album, but only have one user be able to add/edit/delete?



---
The MacNut
Owner, ClarisWorks/AppleWorks Email List
http://awlist.macnuthome.com



[ Reply to This | # ]
What About Many Users View, But One User Edit?
Authored by: buijs on Sep 10, '05 06:22:33AM

Just turn on bonjour sharing in the iPhoto preferences



[ Reply to This | # ]
What About Many Users View, But One User Edit?
Authored by: roundy on Sep 12, '05 10:42:59AM

This works, but requires that iPhoto be continuously running for others to access the photos. The other hints here do not require iPhoto to be running for others to see the pictures.



[ Reply to This | # ]
What About Many Users View, But One User Edit?
Authored by: rhowell on Sep 10, '05 01:18:06PM

If you put the iPhoto library in /Library/Shared, as the example in step 2, and then you skip step 3 for these read-only users, then they'll have viewing capabilities already.



[ Reply to This | # ]
What About Many Users View, But One User Edit?
Authored by: sjk on Sep 10, '05 04:26:31PM

Did you mean /Users/Shared ?



[ Reply to This | # ]
What About Many Users View, But One User Edit?
Authored by: rhowell on Sep 11, '05 12:20:34AM

yes.



[ Reply to This | # ]
What About Many Users View, But One User Edit?
Authored by: elmimmo on Sep 11, '05 05:57:19AM

I do not think iPhoto will let you open read-only Libraries (besides CD and DVDs). I did not try that, though.



[ Reply to This | # ]
10.4: Share an iPhoto library among multiple users
Authored by: jmcdonnell on Sep 12, '05 08:37:50PM

Why not just turn on sharing in the sharing panel in the preferances in iphoto



[ Reply to This | # ]
10.4: Share an iPhoto library among multiple users
Authored by: elmimmo on Sep 14, '05 04:58:19AM

Because:
1) Guests only have read access.
2) The user sharing iPhoto must have iPhoto open, either through Fast User Switching or on a networked computer.

It serves a use, which is not the same as the need that this hint tries to solve.



[ Reply to This | # ]
Using this method to share iTunes libraries also...
Authored by: mjij on Oct 30, '05 07:44:02AM

Hello:

As Rob commented at the end of this post, this method of sharing the iPhoto library between multiple users on your machine will indeed work for the iTunes library as well.

Simply combine all of your music files into one account, move that folder to /Users/iTunes, and use the above ACL commands to make that folder editable by each user you wish to have access to it.

Then, you must find the iTunes Library file and do the same thing to it and the .xml file.

It works like a charm and it's sure a lot easier than changing the file permissions every single time you open the application as captnswing suggests in another hint.

If you have any questions about what I'm saying, just post them here.



[ Reply to This | # ]
Using this method to share iTunes libraries also...
Authored by: Whomper on Nov 17, '05 04:39:01AM

I've got iPhoto working splendidly, but iTunes won't play.

I'm keeping my shared libraries on my second hard-drive in this Powermac, which is called Storage. Accordingly, I've enabled ACL for /Volumes/Storage/ rather than / (enabling for / had no effect, so I had to enable /Volumes/Storage/ I later disabled /, which didn't effect iPhoto).

So, in /Volumes/Storage/Shared/ I have a newly created folder called iTunes. This has been symlinked from ~/Music/ on both user accounts, then the chmod rights set, as with iPhoto. The folder contains freshly created files iTunes Library, iTunes Music Library.xml, and fresh folder iTunes Music, into which I had iTunes copy all my music.

This works fine for my main, administrative user, but the second user account is not happy, saying that "The folder iTunes is on a locked disk or you do not have write permissions for this folder".

Any guesses?



[ Reply to This | # ]
Using this method to share iTunes libraries also...
Authored by: Whomper on Nov 17, '05 04:56:45AM

I'm a big numpty. Quite simply forgot to set the usual permissions on the folder, so it was unreadable by the other user. All working peachily now.



[ Reply to This | # ]
10.4: Share an iPhoto library among multiple users
Authored by: abudinsz on Jan 06, '06 03:10:23PM

Are there any restrictions on concurrent use of the same library by two users? For example I have an iPhoto library on a server that we both have access to thanks to the ACL method, and we are both attempting to access the simultaneously library from two separate clients? Doesn't sound like that would work...



[ Reply to This | # ]
10.4: Share an iPhoto library among multiple users
Authored by: peterluxford on Jan 15, '06 08:41:53AM

I think this worked on my emac, but I would like to move my iphoto library to external drive.

When I ran the script it said function no t supported. How would I get this to work on an external drive?



[ Reply to This | # ]
iLife '06
Authored by: jeffedsell on Mar 23, '06 09:08:07AM

I've been using this hint for months, and it works great. However...

I just upgraded to iLife '06. When you first launch the new iPhoto, it asks to update your iPhoto library. (You must either comply or quit.) When iPhoto examined my iPhoto library before updating, it said I didn't have proper permissions. This problem occurred both in my account and my wife's.

Here's how I had to fix it: I moved my iPhoto library out of Users:Shared onto my Desktop, held down Option while opening iPhoto so it would ask where to find my iPhoto library, than pointed it to the iPhoto library's new location on the Desktop. It updated the iPhoto library with no problems.

Then I quit iPhoto, moved the iPhoto library back into Users:Shared, and Option-opened iPhoto again. When it asked where to find my iPhoto library, I directed it to the correct location.

Everything seems to be fine now. I switched to my wife's account (after quitting iPhoto in my account, of course) and opened iPhoto -- it worked perfectly with the newly updated iPhoto library.



[ Reply to This | # ]
10.4: Share an iPhoto library among multiple users
Authored by: tjevans on Apr 08, '06 02:08:31PM

Gee . . . all I had to do was move the library to the shared folder and modify permission so that a group to which both my wife (who has a separate account) and I belong can reand & write.

I've seen some replies that say that should only work for the items currently in the library at the time of modifying permissions, but I've modified files she has later added and she has modified files I've added after setting the permissions.



[ Reply to This | # ]
10.4: Share an iPhoto library among multiple users
Authored by: Mr The Plague on Apr 12, '06 07:27:54PM

I have followed the steps described in the tip and I keep getting the following error when I try to set the ACL for the iPhoto Library directory:

chmod: Failed to set ACL on file /Users/Shared/iPhoto Library: Operation not supported

Turning on ACLs worked fine so I am not sure why the acutal setting of the permission is failing. The only thing different about my setup is that I have the Users directory as a separate drive from the drive the OS runs on. Is ACL's only being set for one of the volumes? Thanks for the help.



[ Reply to This | # ]
10.4: Share an iPhoto library among multiple users
Authored by: mccronin on Nov 15, '07 08:17:41PM

Anyone know if this hint still works with iPhoto '08 and Leopard? And, if so, how does the setup change for the new iPhoto Library package format?



[ Reply to This | # ]
10.4: Share an iPhoto library among multiple users
Authored by: paul7 on Nov 18, '07 11:33:01PM

So, with iPhoto '08 and Leopard, it's even easier. Here's what you do:

1. From the user account that originally created the iPhoto file, place the iPhoto file in a directory that everyone has permission to edit. ie. in the 'user/Public' directory.
2. Right click the file and select "Get Info"
3. Expand "Sharing & Permissions" if it's not already expanded.
4. Click the Lock icon on the bottom right corner. You'll have to enter your admin password.
5. Delete "everyone" under the "Name" column if you don't want just anyone to have access to the file. Otherwise, keep "everyone" and skip to #7.
6. Click the plus icon and add the user you want to give permission to. Make sure that under the "Privilege" column, they have "Read & Write". Click on it to change it.
7. Log into the user that is trying to use the share'd iPhoto account. They should hold down the option key while clicking on the iPhoto icon to start the program. It will ask you for where the iPhoto library is. Select the library under the "Public" folder. You should only have to do this once.

That should be it! No terminal needed!



[ Reply to This | # ]
10.4: Share an iPhoto library among multiple users
Authored by: mrski on Jan 11, '09 11:50:34PM

This didn't work for me. :( I'm trying it in just a bit different way. Hopefully, you can tell me what I'm doing wrong.
1. I tried to place the iPhoto Library on a shared volume. '/Volumes/Backup01/iPhoto'
5. There's no way to Delete "everyone" in the Get Info window. I can't even change permissions to anything but "Read & Write". I tried to continue, since it's fine that everyone have access.
7. When opening iPhoto, and choosing the shared library, I get an error message that says "An error occurred while trying to save your photo library..."

I think the shared folder and/or library doesn't have the right permissions, so iPhoto opens the library fine, but tries to write something and can't.



[ Reply to This | # ]
10.4: Share an iPhoto library among multiple users
Authored by: adam.n on Nov 28, '07 11:31:44AM
Managed to get ad hominem's ACL trick (http://ad.hominem.org/log/2005/07/acl.php) fully working for both iPhoto and iTunes in Leopard. Not 100 % sure what I did though :) Basically followed ad hominem's instructions, plus enabled read/write authority for both users, plus (itunes library only) the same for the user "group" via the application Batchmod. In other words, it seems like this idea works well in Leopard, but needs some minor adjustments.

I am not sure if the suggested tip from paul7 works as intended, it might well. For me, though, I needed to add ACLs to get complete sync between users. Ideally, of course, you want the library to be instantly up to date and identical for both users, when one user has added photos, albums or edits. Works well for us so far, very practical. Only tried it for 10 minutes though, no guarantees :)

[ Reply to This | # ]
ACLs on the entire Shared directory?
Authored by: TF on Dec 13, '07 02:59:41PM

Is there any reason to not add the ACLs for the entire /Users/Shared directory? I mean, really, anything in this directory I (personally) want to give all users read/write priviledges. IMHO, that is what the Shared folder is about, and the ~/Public is about read-only.

If I update the ACLs for the Shared directory and copy in an existing iPhoto library, everything *should* work, right?



[ Reply to This | # ]