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

Share iPhoto libraries with multiple users on one machine Apps
In my home computer, I wanted separate user accounts for my wife and myself, but I also wanted to have a single iPhoto library shared by the two users. Here is the trick.
  1. You have to change iPhoto's umask setting. After backing up iPhoto, type the following commands:
     % mv /Applications/iPhoto.app/Contents/MacOS/iPhoto \
       /Applications/iPhoto.app/Contents/MacOS/iPhoto.bin
     % printf '#!/bin/sh\numask 002\nexec $0.bin\n' > \
       /Applications/iPhoto.app/Contents/MacOS/iPhoto
     % chmod +x /Applications/iPhoto.app/Contents/MacOS/iPhoto
  2. Make one of the users launch iPhoto. This will create a /Users -> toto -> Pictures -> iPhoto Library directory. Quit iPhoto and type the following commands:
     % chmod g+s "/Users/toto/Pictures/iPhoto Library"
     % mv "/Users/toto/Pictures/iPhoto Library" /Users/Shared
  3. Launch iPhoto and tell it to use the iPhoto Library at its new location (it will ask when it can't find the one it originally created).
  4. Have the other user launch iPhoto. Quit iPhoto. Delete the /Users -> tata -> Pictures -> iPhoto Library directory. Lauch iPhoto and again tell it use the shared iPhoto Library.
If you have more than those two users on your computer, and you don't want that these other users to be able to change data in the iPhoto Library, it gets a bit more complicated.
  1. Change the NetInfo database to create a group named "iphoto" and make toto and tata members of this group.
  2. Change the group ownership of the shared iPhoto Library by typing:
     % chgrp -R iphoto "/Users/Shared/iPhoto Library"
[robg adds: I haven't tested this one...]
    •    
  • Currently 1.00 / 5
  • 1
  • 2
  • 3
  • 4
  • 5
  (1 vote cast)
 
[40,793 views]  

Share iPhoto libraries with multiple users on one machine | 12 comments | Create New Account
Click here to return to the 'Share iPhoto libraries with multiple users on one machine' hint
The following comments are owned by whoever posted them. This site is not responsible for what they say.
problem with printf
Authored by: andrew_zinn on Sep 26, '03 10:41:43AM

Thanks, been wanting a way to do this for a long time, but after the printf command I get the following message:
/bin/sh: Event not found.



[ Reply to This | # ]
My fault...
Authored by: Ptitboul on Sep 26, '03 11:40:37AM
Oups, you are right. I forgot that my shell is zsh instead of the default tcsh... The following should work for you: printf '#\!/bin/sh\numask 002\nexec $0.bin\n'. By the way, this line only creates a file named iPhoto that contains
#!/bin/sh
umask 002
exec $0.bin
Another remark: you should probably use the following file instead, because it keeps the command line arguments of iPhoto, in case they are useful... But it works without arguments.
#!/bin/sh
umask 002
exec $0.bin "$@"
By the way, be careful with this hint. It is probably incompatible with Apple updates of iPhoto.

Last remark. I don't understand why Apple did not choose to create a new gid for each user, and to have a default umask 002. Unix groups are much more useful with this setting.

[ Reply to This | # ]

This is something I've wanted but..
Authored by: riktexan on Sep 26, '03 12:34:57PM

...are these commands done in terminal? I'm just non-tech enough to not understand exactly where all this stuff goes. Also, does iPhoto end up working the same for either user or does this change put in something odd?
Thanks



[ Reply to This | # ]
This is something I've wanted but..
Authored by: andrew_zinn on Sep 26, '03 01:02:45PM

Yes, they are UNIX commands entered using Terminal. I did a Google search for "share iPhoto libraries" and the first hit was this link, which describes another way to accomplish the goal without using the command line:

http://www.malcolmadams.com/itunes/itinfo/sharedlib.shtml



[ Reply to This | # ]
One line of the hint is not necessary
Authored by: Ptitboul on Sep 30, '03 12:30:54PM
You can forget the chmod g+s "/Users/toto/Pictures/iPhoto Library" line I wrote. I just noticed that the behaviour of Darwin is non-standard, and that all files are created with the gid of the parent directory, even when the Set-GID bit is not set.

[ Reply to This | # ]
I did it without any fancy code
Authored by: nigel314 on Oct 11, '03 05:48:43AM

To share a library with my wife's account I simply moved my library to the shared folder in the Users folder and when iPhoto couldn't find the usual library I pointed it at the new location. I then deleted my wife's library in her account area, having moved any photos first. Again when iPhoto couldn't find the library in her area I simply poined it at the new one in the shared area. No need for any code at all!



[ Reply to This | # ]
I did it without any fancy code
Authored by: themexican on Oct 20, '03 12:14:51PM

I did this but am having permissions problems... I can see the library but not edit it. And when I try to change access to read/right I'm not able to... aargg.



[ Reply to This | # ]
I did it without any fancy code
Authored by: jspivack on Nov 27, '03 11:52:50PM

I imagine that the simplest workaround would be to put the iPhoto library on an external drive and check "Ignore ownership on this volume"--similar to the solution for sharing iTunes. But I want to be able to carry my pictures around on my laptop (not an issue with iTunes, since I lug around my music on my iPod). Perhaps the solution would be to partition my internal drive to have an "iPhoto" volume for which I would then check "Ignore ownership on this volume". But in the absence of a "Partition Magic"-style app for the Mac (Windows app that allows on-the-fly partition management), it seems like a lot of work just to share an iPhoto library...



[ Reply to This | # ]
"Partition Magic"-style app
Authored by: Peter Schoenrank on Jun 03, '05 04:38:42PM
But in the absence of a "Partition Magic"-style app for the Mac
Try iPartion or VolumeWorks.

I haven't used VolumeWorks. I have used iPartition. The user interface is a little awkward in places, but having got the hang of it, I have not had a problem with it. YMMV.

It is a very good idea to have a reliable (i.e. tested) back up of your important data before you use any such disk tool.

[ Reply to This | # ]

Sorry, doesn't (completely) work!
Authored by: Anonymous on Nov 01, '03 05:19:06PM

This hint doesn't work. It only partially works but doesn't solve the whole problem.

The 'umask 002' command is supposed to make all files created with group write permission. But when you import from your camera the files are rw-r--r-- !. Even if you duplicate a picture, the new file gets copied with the same permissions (no group write).

Ironically, if you DON'T do this hint and have a rw-rw-r-- file, the copy created with the Duplicate command does NOT have group write permissions...so the umask IS doing something.

I tired to apply this trick to Image Capture.app hoping this was where the permissions were set on an import, but it didn't help.

Essentially, all this trick does is make sure that files that are already Group/Write don't lost that setting but new files are still Group/Read-only.

Anyone want to venture to guess why this doesn't work?

Robert



[ Reply to This | # ]
Sorry, doesn't (completely) work!
Authored by: geoffsaulnier on Nov 04, '03 09:17:40PM
You will need to do a little more work if you want to get all this to work every day. The way iPhoto stores stuff is to create directgories for the year, the month, the day, and then the photos. So, when you import, it creates a directory with your umask pemissions, and the other users cannot access it.

I fix this by setting up a crontab to run every night for the root user:

# Make sure that anyone in group saulnier can write to the iPhoto library
00 02 * * * /usr/sbin/chown -R geoff:saulnier /Users/Shared/iPhoto*; /bin/chmod -R 775 /Users/Shared/iPhoto*

Please excuse any garbling - should be two lines, on starting with a # and the other starting with 00

That ensures that the permissions for the entire thing are reset at 2am every day. I have a group called saulnier, and my wife and I are in it. This would work less well if we were both using it multiple times in the same day.

The ideal would be to attach this to a .logout script - but now, with fast user switching, it is even more difficult to ascertain when a new user is trying to use the app, etc.

Anyone with a clever idea?

---
___

Geoff Saulnier - Mac, *NIX, perl, hack!!

[ Reply to This | # ]

Sorry, doesn't (completely) work!
Authored by: jnm on Jan 21, '04 01:49:41PM
Yep, another idea but cannot try it : copy your iPhoto Library on another volume with access rights disabled, then create a symbolic link ala unix :
% cd ~/Pictures/
% mv iPhoto\ Library iPhoto\ Library.old
% ln -s /Volumes/YOUR_VOLUME_NAME_HERE/iPhoto\ Library

Just let me know....

---
--
Jnm.

[ Reply to This | # ]