Become a MacRumors Supporter for $50/year with no ads, ability to filter front page stories, and private forums.

AppleNooble

macrumors regular
Original poster
May 14, 2021
120
23
Hi, I'm trying to open the History.db file from:

/Users/[yourname]/Library/Safari/History.db

Using the program "DB Browser for SQLite". I opened the application and tried opening that folder from that app. At some point, I got a prompt that I didn't quite read and just semi-autopilot clicked to deny it permission. So the problem is, I can't remember exactly which folder I was at when the prompt happened, so I'm not sure what folder I rejected the permission for. I tried uninstalling the program but after re-installing, I didn't get the prompt again. So something got written somewhere. If I click "Get Info" in the Library folder, I see two users:

myself /w Read & Write access
everyone /w No Access

The folder Safari and the History.db files both have three users:

myself /w Read & Write access
staff /w Read only access
everyone /w Read only access

So it's most likely that my Library folder is the folder I was at when the prompt popped up. I tried opening the database and got an error. Now I can't even see the Library folder even if I press CMD+SHIFT+. . So basically, this seems to back up my idea that this app no longer has access to the Library folder. (I THINK the main reason why I didn't read the prompt was because I think it was actually asking for something silly like permissions to read my contacts for some reason, so perhaps the prompt wasn't even as I described things, in fact I'm pretty confident that that's what happened. So perhaps the permissions weren't changed for the Library folder after all.)

What's the correct way to allow permission to this app to this folder?

I tried searching for system files for this app, but found none.

EDIT: I think I figured out what the prompt was... I searched in System Settings "application" and sifted through the results. I found under "Allow applications to access Reminders" that "DB Browser for SQLite" listed with permissions not granted! So perhaps the Library folder isn't involved at all after all!

EDIT2: Maybe it was asking about downloads folder. Also found it listed under "Allow applications to access user files".
 
Last edited:
1. Why are you using DB Browser for SQLite? You can just press ⌘Y in Safari to see the History.

2. You can reset all permissions for the DB Browser for SQLite app from Terminal with:
Code:
tccutil reset All net.sourceforge.sqlitebrowser
It should ask again for permission when you try to access a protected folder. You can copy History.db to you desktop or another folder and give limited access.

PS Thank you for mentioning DB Browser for SQLite, I didn’t know about it. :)
 
1. Why are you using DB Browser for SQLite? You can just press ⌘Y in Safari to see the History.

2. You can reset all permissions for the DB Browser for SQLite app from Terminal with:
Code:
tccutil reset All net.sourceforge.sqlitebrowser
It should ask again for permission when you try to access a protected folder. You can copy History.db to you desktop or another folder and give limited access.

PS Thank you for mentioning DB Browser for SQLite, I didn’t know about it. :)
1. Because Safari doesn't timestamp the history. With this DB viewer, you can see times that you accessed the site. See here:


2. Very cool, thanks for that! I've always wanted a tool like that. Looks like it exists!

EDIT: I had a poke around in the Privacy & Security->Files and Folders menu and nothing appears to be modifiable? I can see a list of apps that have access to files and folders, but I can't modify anything? When I clicked on Xcode, it has folders listed with a selection toggle. But it seems this menu doesn't have the fine grain control I was hoping. The DB Browser for SQLite just has a listing of "Full Disk Access" but you can't modify it it seems.
 
Last edited:
EDIT: I had a poke around in the Privacy & Security->Files and Folders menu and nothing appears to be modifiable? I can see a list of apps that have access to files and folders, but I can't modify anything? When I clicked on Xcode, it has folders listed with a selection toggle. But it seems this menu doesn't have the fine grain control I was hoping. The DB Browser for SQLite just has a listing of "Full Disk Access" but you can't modify it it seems.
You can add and remove apps in the "Full Disk Access" section, but the Files and folders section is based on what apps ask.
https://developer.apple.com/documen...operty_list/nsdocumentsfolderusagedescription

To reset “Full Disk Access”
Code:
tccutil reset SystemPolicyAllFiles
To remove only for DB Browser for SQLite
Code:
tccutil reset SystemPolicyAllFiles net.sourceforge.sqlitebrowser
 
  • Like
Reactions: AppleNooble
I'd never heard of "DB Browser for SQLite" until I read this post.

So... I searched for and downloaded the app.

Then I launched it and directed it to my own:
home/library/safari/history.db

And...
... it opened right up. Is this what they call "beginner's luck"?

If you're having trouble with permissions, I'd like to offer a "Fishrrman sounds crazy workaround approach":

1. You'll need a USB flashdrive (or external drive of any kind).
2. Locate the History/db file in the finder
3. Connect the flashdrive, let it mount on the desktop
4. Drag the icon of the History.db file to the flashdrive (this will create a copy on the flashdrive).
5. Now, click ONE TIME on the icon for the flashdrive to select it.
6. Bring up the "get info" box for the icon (type command-i)
7. At the bottom of get info, click the lock and enter your password
8. Put a check into "ignore ownership on this volume" (sharing and permissions)
9. Close get info
10. Launch DB Browser and (using the "file/open" dialog) navigate to the flashdrive and try to open the History/db file now.

Any change?
 
Then I launched it and directed it to my own:
home/library/safari/history.db
And...
... it opened right up. Is this what they call "beginner's luck"?
No, you have SIP disabled and it doesn't bother you with such silly questions :)
 
  • Like
Reactions: Fishrrman
Register on MacRumors! This sidebar will go away, and you'll see fewer ads.