I copied several thousand photos off of a network drive onto my local drive and I'm trying to import them into Photos. Several hundred of them had an "Unknown Error" importing, so I opened Console, tried reimporting one of the failed photos, and found this in the logs:
CreateWithURL:306: *** ERROR: err=1 (Operation not permitted) - could not open /Users/david/Downloads/1980s/1989_April_0001_a.jpg
I'm stumped. I allowed Full Disk Access for Photos in the settings and restarted. I ran chmod 777
on all the photos. I even tried running Photos as sudo. I got the same error every time. I ran DiskUtil diagnostics on the drive and it's not showing any file permissions issues.
Some Googling tells me that this is due to the System Integrity Protection baked into the last few macOS releases, but I still don't understand why Photos wouldn't have the necessary permissions on these files. I'd also like to not disable SIP, but I'm not sure what else to do. Is there anything else I can try?