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

Share an iPhoto4 Library between two or more users Apps
I used to share the same iPhoto Library with my wife, using a standard unix symbolic link so that the folder "iPhoto Library" in my wife's home folder was actually a symbolic link pointing to my real folder in my home, and regularly change access rights to all files in the folder to allow my wife to work on it.

This hack is broken with iPhoto4, as it resets owner and access rights of the AlbumData.xml file. I found a simple solution to fix this issue, provided you have a volume onto which you disabled access rights :
  1. Copy your iPhoto Library folder to the volume with access rights disabled. The iPhoto Library folder stands in your home folder, under the folder Pictures.
  2. Rename your original iPhoto Library folder to "iPhoto Library - old" (in your home folder, under the folder Pictures).
  3. This is the tricky part : for each of the users, open the Terminal application (in Applications/Utilities), and type the following commands :
    % cd Pictures
    % ln -s /Volumes/YOUR_VOLUME_HERE/iPhoto Library
    
Now every user iPhoto Library is a link that points to the real iPhoto Library which is on the Volume with access rights disabled, et voila !
    •    
  • Currently 1.50 / 5
  You rated: 1 / 5 (4 votes cast)
 
[11,940 views]  

Share an iPhoto4 Library between two or more users | 13 comments | Create New Account
Click here to return to the 'Share an iPhoto4 Library between two or more users' hint
The following comments are owned by whoever posted them. This site is not responsible for what they say.
why bother?
Authored by: rbenezra on Jan 29, '04 11:31:19AM

iPhoto 4 is Rendezvous enabled. I can see any library of any machine on my home newtork in the Album list once I launch iPhoto. Maybe the symbolic link does more?



[ Reply to This | # ]
duh...
Authored by: SOX on Jan 29, '04 11:53:58AM

1) he is trying to share a set of photos on the SAME computer between two users, not between two different computers
2) he wants to be able to edit the photos not just look at them



[ Reply to This | # ]
Ummm, NOT duh...
Authored by: derPlau on Jan 29, '04 12:19:00PM

Actually, Rendezvous sharing works across accounts on the same computer, too. And, since you can copy images from shared folders to your local folder, you can edit them as well. This isn't ideal for everyone, since (1) it requires that iPhoto be up and running in both the "source" account (the one with the main library) and the current user's account; and (2) it's a bit of an effort to get the edited image back into the original library.

But, all in all, it's a potentially workable solution for some (including me)... hardly worthy of a "duh".



[ Reply to This | # ]
Ummm, NOT duh...agreed!
Authored by: rbenezra on Jan 29, '04 03:39:28PM

Thanks for the added info. In addition, most of us after editing a photo might want to let other users make their own changes.....this seems to be the way to go for probably most of us.....not withstanding the ..."duh" ....from the imbecile above



[ Reply to This | # ]
Share an iPhoto4 Library between two or more users
Authored by: SOX on Jan 29, '04 11:58:45AM

Could you elaborate a bit. Why does not changing the owner/access rights allow someone to share the files as before? I understand that iphoto creates new entires with the owner set to the current user. But it always did this. you had to change the owner/access each time you added new photos. So what changed?<p>

Also if the problem is that you just want to keep one file from shifting its priviledges/owner perhaps one could do this with the lock flag found in setflags. not sure about that.



[ Reply to This | # ]
Share an iPhoto4 Library between two or more users
Authored by: jnm on Jan 29, '04 02:29:01PM

Hi Sox,

The problem is with the AlbumData.xml file. I don't know why, but access rights to this file are reset to a default rw------- every time you launch iPhoto 4 (and it looks like it does so every time it quits too!). Believe me, the effects are strange when you are not the owner of the AlbumData.xml file, even if you have read/write access to it: iPhoto just crashes.

I thought about adding a kind of wrapper which would have changed the owner to the current user every time iPhoto is launched, but if two or more users have iPhoto launched at the same time, only the last one would not crash...

The only solution that came up to my mind was to disable owner and access rights to this file, which is done by putting the whole Library on a volume that's got access rights disabled, which resolves eventually the other problem of access rights to all the photos.

---
--
Jnm.



[ Reply to This | # ]
Well, darn...
Authored by: mickelsn on Jan 29, '04 05:31:46PM

Well, this is a major blow--I was wondering what was going on after installing iPhoto 4 blew away the symlink in my wife's account, and my attempts to re-create it always resulted in the crash...

You know, I just have to wonder why Apple hasn't quite gotten there with a "family" setup...they have ALL the right pieces in place (a strong Unix underpinnings for good security, Fast User Switching, and some of the best-in-class apps for common home functions like iTunes and iPhoto).

After all, iTunes allows you to specify the destination for your library--I didn't have to result to many tricks to get things to work between my account and my wife's to share music (although something should be done about iPod auto-updating to make it a bit easier to tie auto-updating to ONE account even though the source library is shared). Why isn't there a similar option to specify your iPhoto Library's location as well?

And don't even get me started on sharing Address Book or iCal data between two accounts on the same machine...it should be easy, and it shouldn't take .Mac. It should just "happen" via the Shared Users folder.

For that matter, why can't (some of) these apps handle two databases at once? It would make great sense for Address Book and iCal (if not iTunes and iPhoto) to be able open one "private" library from a user's home directory, and a "shared" library from the Users/Shared/ directory. You could do the same thing with iPhoto and iTunes as well, setting preferences for where things ought to go be default when ripping or importing (with case-by-case over-riding of the preference setting). After all, do you like ALL the same music as your spouse? Or your kids?

Oh, well...time to file some bug reports...

Thanks...Neil



[ Reply to This | # ]
And why not a script?
Authored by: thinkyhead on Jan 29, '04 07:16:51PM
The following shell script "combinemusic" must be executed with sudo. It uses hard links instead of symbolic links. I feel more secure doing it this way for some reason. The music library of the user that runs this script is the one that becomes shared. This is safe to run when iTunes is running, but don't.

#!/bin/sh
#
# combinemusic
#
# shell script to share a single music library with all users
#

ITUNES="/Users/Shared/Shared iTunes"
FILE1="iTunes 4 Music Library"
FILE2="iTunes Music Library.xml"
SAVE="Saved Library"

if [ `whoami` != "root" ]; then
 echo "This script requires root privileges."
 exit 1
fi

if [ -f "$ITUNES/$FILE1" ]; then
    echo The Shared iTunes Library already exists
    exit 1
fi

mkdir -p "$ITUNES"

cd ~/Music/iTunes
ditto --rsrc "$FILE1" "$FILE2" "$ITUNES"
chmod -R 777 "$ITUNES"

for U in `ls /Users | grep -v Shared`
do
    if [ -d "/Users/$U" ]; then

        cd "/Users/$U/Music"

        if [ ! -e iTunes ]; then
            mkdir -p -m 755 iTunes
            chown $U:$U iTunes
        fi

        cd iTunes

        if [ -e "$FILE1" -o -e "$FILE2" ]; then
            mkdir -p -m 770 "$SAVE"
            chown $U:$U "$SAVE"
        fi

        if [ -e "$FILE1" ]; then
            mv "$FILE1" "$SAVE"
        fi

        if [ -e "$FILE2" ]; then
            mv "$FILE2" "$SAVE"
        fi

        ln "$ITUNES/$FILE1" "$FILE1"
        ln "$ITUNES/$FILE2" "$FILE2"
    fi

done

---
|
| slur was here
|

[ Reply to This | # ]

And why not a script? for iphoto??
Authored by: askwersky on Feb 16, '04 05:42:55PM

Can you give an example of how you would changes this for iPhoto?



[ Reply to This | # ]
Join the same group
Authored by: kmue on Jan 30, '04 03:06:11AM
Why not create a group "iphoto" and change users to this group with Netinfo Manager. Then give write permission to the Group with

chmod -R g+w ~/Pictures/iPhoto\ Library
Should work... at least iPhoto does not change the permissions.

[ Reply to This | # ]
Join the same group
Authored by: rjbailey on Jan 30, '04 10:13:38AM

Didn't work: starting and quitting iPhoto changes the AlbumData.xml file back to group "wheel" with "-rw-r--r--" permissions.



[ Reply to This | # ]
The file is deleted and recreated
Authored by: ajoakland on Feb 08, '04 12:34:51PM

The problem is that the .xml file gets deleted and recreated. So the new file gets created with the default settings. (It may be affected by the unix umask setting.)



[ Reply to This | # ]
Share an iPhoto4 Library between two or more users
Authored by: eno on Jan 31, '04 09:18:52AM

You'd think Apple would make it easy for users to put stuff like this inside "/Users/Shared/"...



[ Reply to This | # ]