“History.db” couldn’t be copied because you don’t have permission to access

I am trying to read history of below browsers in Mac through daemon.

  1. Safari (History.db)
  2. Google Chrome (History)
  3. Firefox (places.sqlite)

Since the original History.db files are locked, i am copying it to another location so i can read from copied one. However i get below error,

**“History.db” couldn’t be copied because you don’t have permission to access"

Error Domain=NSCocoaErrorDomain Code=512**

Any help is much appreciated.

Safari’s history database is protected by a data vault. For more on this, see my On File System Permissions post.

Share and Enjoy

Quinn “The Eskimo!” @ Developer Technical Support @ Apple
let myEmail = "eskimo" + "1" + "@" + "apple.com"

Please note I am getting this error while copying Safari's History.db. For rest browser it works fine.

As per my understanding from below documents user has to provide our app "Full Disk Access" from System Preferences -> Security & Privacy settings to access Safari's Web history file.

There is no API we can use to get Full Disk Access from user. Also it is not a recommended way by Apple since currently Data Vaults are completely private to Apple.

Please confirm @eskimo.

https://developer.apple.com/forums/thread/678819 https://developer.apple.com/forums/thread/114452?answerId=352695022#352695022

As per my understanding from below documents user has to provide our app "Full Disk Access" from System Preferences -> Security & Privacy settings to access Safari's Web history file. There is no API we can use to get Full Disk Access from user. Also it is not a recommended way by Apple since currently Data Vaults are completely private to Apple.

Please confirm @eskimo

https://developer.apple.com/forums/thread/678819 https://developer.apple.com/forums/thread/114452?answerId=352695022#352695022

“History.db” couldn’t be copied because you don’t have permission to access
 
 
Q