MacOS access denied to backup Fotos Library.photoslibrary

When I try to Backup the Apple Fotos Library I get the following warning in Duplicati:

  • 2025-06-06 09:00:07 +02 - [Warning-Duplicati.Library.Main.Operation.Backup.FileEnumerationProcess-FileAccessError]: Error reported while accessing file: /Users/someone/Pictures/Fotos Library.photoslibrary/ UnauthorizedAccessException: Access to the path ‘/Users/stef/Pictures/Fotos Library.photoslibrary’ is denied.

In the System Settings → Privacy & Security - Duplicati has:
Full Disk Access
therefore also Photos access

This used to work with previous macOS and Duplicati Versions. Even completely setting up the backups from scratch did not help.

Using MacOs 15.5, Duplicati: 2.1.0.5_stable_2025-03-04

Thanks in advance for any help!

Hi @Stef_LeChef, welcome to the forum :waving_hand:

Not quite. There are some things that are considered “more private” than full disk access, including photos and contacts. Apps running on macOS cannot access these special folders without being approved and vetted by Apple, which Duplicati currently is not.

There is no permission you can toggle to grant Duplicati access, so for now, the workaround is to get an approved app, like Photos, to export it and back up from there. You can use a small script such as:

mkdir ~/ExportedPhotos
photos export ~/ExportedPhotos

Thanks kenkendk, I wasn’t aware of that! As much as I appreciate Apple prioritising security, this is a bit of nuisance.
While experimenting with previous workarounds from the time when Dduplicati’s tray icon did not work, I just discovered another workaround:
Start Duplicati from the Terminal.app (with full disk access) with the command
open -a /Applications/Duplicati.app/Contents/MacOS/duplicati
I put this in a shell script with .command extension and launch Duplicati from there. You can even experiment with other options of the open command

Smart workaround, I did not consider that.

On my own machine, I can see that I somehow managed to grant iTerm access to my Photos in “Privacy & Security”. That suggests that we can perhaps give Duplicati an entitlement, which would then allow it to show up as an app that can be granted access.

EDIT: I looked at iTerm2, and it seems it just has a NSPhotoLibraryUsageDescription that grants the access. I have applied that to Duplicati for the next release.

2 Likes

I just tested with Duplicati 2.1.1.0_experimental_2025-07-17 and I am still getting access denied.

"2025-07-31 10:35:05 -04 - [Warning-Duplicati.Library.Main.Operation.Backup.FileEnumerationProcess-PermissionDenied]: Excluding path due to permission denied: /Users/someone/Pictures/Photos Library.photoslibrary/\nUnauthorizedAccessException: Access to the path '/Users/someone/Pictures/Photos Library.photoslibrary' is denied."

Is the fix expected to be included?

If I look at System Settings > Privacy & Security > Photos, I don’t see duplicati listed.

I’m running MacOS 14.7.2

Ok, I managed to get it read from the photo library after fiddling a bit more. I’m not sure which step was critical, but here’s what I did:

  • Ran sudo tccutil reset All com.duplicati.app
  • Opened the Source Data editor for my backup
  • Expanded the tree view for various folders under /Users/myuser
    • This caused the OS to prompt to allow access to read the Desktop, Downloads, and other folders.
    • It did not prompt me for access to Photos.
    • If I tried to expand the contents of Photos library.photoslibrary it would not allow me to inspect it
    • In System Settings, I added Full Disk Access for Duplicati
    • Restart Duplicati
  • I opened the Source Data UI again and it can now inspect the contents of Photos library.photoslibrary

Yes, the fix is included, but I have since investigated a bit more.

The way Photos works on MacOS is that it is “partly cloud stored”, so simply reading the folder is not a guarantee for getting all your photos backed up. The Photos app may decide to store parts of the photo library in iCloud.

The right way, according to Apple docs, is to use a special Photos API that lets Duplicati enumerate the photos, regardless of where they are currently stored. With this API it is possible to read the photos reliably. I have created an issue for supporting Photos library backup on MacOS.

Thanks for the detailed instructions!

1 Like