【发布时间】:2019-11-03 20:35:19
【问题描述】:
我是 Mac 的新手,我正在尝试使用 VSCode 上的代码运行器扩展在我的 iMessage 上运行一些有趣的统计数据。我一直在关注这个帖子:https://towardsdatascience.com/heres-how-you-can-access-your-entire-imessage-history-on-your-mac-f8878276c6e9
但是,当我运行conn = sqlite3.connect('/Users/<username>/Library/Messages/chat.db')
我收到错误sqlite3.OperationalError: unable to open database file
据我所知,我的问题是 VScode 没有访问 ~/Library/Messages 文件夹以及可能还有 chat.db 的正确权限。首先,我在库上运行ls -l,结果是drwx---rwx 用于消息。所以我尝试同时使用chmod a+rwx Messages 和sudo chmod a+rwx Messages 来打开对所有内容的权限,但两次都收到错误chmod: Unable to change file mode on Messages: Operation not permitted。
我做错了什么和/或有更好的方法吗?还是无法更改此文件夹的权限?
【问题讨论】:
-
我的确切问题,解决方案修复。
标签: macos permissions chmod macos-mojave