Sharing System Photos Library between two Mac Users on same machine

Hello!


I can't seem to share my Photos Library with my wife, as we have in the past. Past: iPhoto, Mojave, Library stored in a folder with group permissions set. This worked fine for years.


I read this thread:

Sharing Photos Library between two users … - Apple Community


... and my setup meets all the criteria the top answers suggested:

"the library is on a volume, where the ignore ownership flag has been set. And the volume with the library needs to be locally mounted with a wired connection, on the same Mac where the Photos.app is running."


So, the following makes it seem like I would need to log out for her to be able to open it in her user?


"Sharing the System Photos Library requires that the library is always available for the background processes when you are logged into your user account, even if you are currently not working with Photos."


... as I did get a message that said that the Photos Library was in use when I switched to her user account and tried to open it.




Mac Studio (2023)

Posted on Aug 8, 2023 2:02 PM

Reply
Question marked as Best reply

Posted on Aug 9, 2023 2:54 AM

The system Photos Library is always in use, as long as you are signed into your user account. If you want to be able to remain logged in when switching users, you must not make your shared Photos Library the System Photos Library (System Photo Library overview in Photos on Mac – Apple Support (UK)). But that would be somewhat limiting, as you could no longer access your Photos Library from other applications.


As an alternative - have you considered to have separate Photos Libraries, but share a common library in iCloud, using the Shared iCloud Photos Library? How to use iCloud Shared Photo Library – Apple Support (UK)



Similar questions

5 replies
Question marked as Best reply

Aug 9, 2023 2:54 AM in response to Brent D.

The system Photos Library is always in use, as long as you are signed into your user account. If you want to be able to remain logged in when switching users, you must not make your shared Photos Library the System Photos Library (System Photo Library overview in Photos on Mac – Apple Support (UK)). But that would be somewhat limiting, as you could no longer access your Photos Library from other applications.


As an alternative - have you considered to have separate Photos Libraries, but share a common library in iCloud, using the Shared iCloud Photos Library? How to use iCloud Shared Photo Library – Apple Support (UK)



Aug 10, 2023 12:43 AM in response to Brent D.

Brent D. wrote:

...

The iCloud Shared Library documentation makes no mention of albums or other ways to organize, and also mentions storing photos for just six months. That just doesn't sound like a good solution.

Signing out would be the easiest way to fix this.


The shared iCloud Library is storing all photos as long as you do not delete them. The "six month" limit applies just to a safety copy of your personal library in iCloud, that will be automatically created, when you first set up the shared library, so you can easily revert to the previous state, if you dshould not like it or your sharing partners make a mess of it. But otherwise the shared iCloud Library will work as expected.


You are right, however, that the albums will not be shared, only the media in the library.

When you use the shared library, each of you will have a system photos library with two sections - your personal library, where you are seeing your personal photos with your albums, plus the shared photos. You can toggle between the shared photos, the personal library, or both together. When you share selected photos they will be moved from your personal iCloud Library to the section with the Shared items, but you will be seeing the photos still in your albums, where they have been. The recipients will need to add them to their own albums however.

Shared photos are shared as pairs of the original and the adjustments and metadata applied. You can both work on the photos and the changes will sync between your shared libraries.




May 10, 2024 12:43 PM in response to Brent D.

Hello,


I have been having this issue for years with the newer versions of Photos without finding a solution other than "logging out of the other account", or "use an external drive", which are not satisfying solutions.

More than once, I thought that the photo library had been definitely corrupted by incorrect permissions and subsequent "repairs", and I have been glad to have a backup...


So I took a bit of time to try to solve it for good this afternoon, and I think I have succeeded. The only requirement is that the library must not be set as the system library. Well, actually it might even work with the system library, but I'd be cautious about it since there might be side effects and nobody wants to loose access to their photos.


So here are two automator apps that will do the following if the photo library ownership is not set to the current user:

  • Quit the Photos application (even if it is running on another account)
  • Quit the photolibraryd and photoanalysisd daemons/processes (even if they are running on other accounts), which are launched in the background with the Photos applcation and lock the photo library even after quitting the application. They are used for things like face recognition and cloud synchronisation.
  • Set the ownership of all files in the photo library to the current user (suprisingly, this is what the Photos application will do to repair the library file permissions)

Finally, open the photo library with the Photos application.


As far as I can tell, they work well.


The first version uses AppleScript. This is probably the one you want to use, the only downside is that it will ask you for administrator password instead of using touchID.


The second version only uses zsh. It will not work unless you make changes to your system configuration, however if you do it will allow you to use touchID, which is more practical in the long run. For it to work, you need to enable touchID authentification for the sudo command. You can easily find ressources about this on the internet - for instance, have a look here for how to do it on Sonoma.


So without further rambling, here is the AppleScript version:



In the shell script action the code is just:

echo "$1"

There might be a more elegant way to perform text conversion but it works.


In the AppleScript action the code is:

on findAndReplaceInText(theText, theSearchString, theReplacementString)
	set AppleScript's text item delimiters to theSearchString
	set theTextItems to every text item of theText
	set AppleScript's text item delimiters to theReplacementString
	set theText to theTextItems as string
	set AppleScript's text item delimiters to ""
	return theText
end findAndReplaceInText

on run {input, parameters}
	set library to input as text
	set library to findAndReplaceInText(library, " ", "\\ ")
	set user to do shell script "echo $(whoami)"
	set owner to do shell script "echo $(stat -f '%Su' " & library & ")"
	if user ≠ owner then
		do shell script "killall -q Photos; exit 0" with administrator privileges
		do shell script "killall -q photolibraryd; exit 0" with administrator privileges
		do shell script "killall -q photoanalysisd; exit 0" with administrator privileges
		do shell script "chown -R " & user & " " & library with administrator privileges
	end if
	return input
end run

A rather long script, but most of the code is to handle text conversion.


You just need to customize the first action, by inputting the path to your library. Be careful about special characters in the library name or in the folders containing the library: spaces are handled by the script, but other special characters may fail (brackets, accented letters, etc...)


And here is the zsh version:


With the following code for the shell script action:

library=$1
user=$(whoami)
owner=$(stat -f '%Su' $library)
if [[ $user != $owner ]]; then
	sudo killall -q Photos
	sudo killall -q photolibraryd
	sudo killall -q photoanalysisd
	sudo chown -R $user $library
fi
echo $library


I hope that it will be useful to some people.

Aug 9, 2023 8:20 PM in response to léonie

I think I need to try the sign-out process to see if that works.


The photo library we have been building for some long time now has over 65,000 photos in it. I have spent time organizing those photos into albums, and folders of albums. I have spent time since migrating to Photos to make sense of organizing all those photos.


One particular thing I want to be able to do is to have our iPhones sync with selected Albums on both our iPhones. (We used to be able to do this with our shared iPhoto Library without issue, so long as only one of us had iPhoto open when the other used it).


The iCloud Shared Library documentation makes no mention of albums or other ways to organize, and also mentions storing photos for just six months. That just doesn't sound like a good solution.

Sharing System Photos Library between two Mac Users on same machine

Welcome to Apple Support Community
A forum where Apple customers help each other with their products. Get started with your Apple ID.