I'd like to copy manually into ~/Library/Messages
to maintain message history.
The folder is owned by the user, not by root:
% ls -al ~/Library | grep Messages
drwx------ 11 sam staff 352 29 Jun 12:11 Messages
and yet I cannot read the contents
% ls -al ~/Library/Messages
total 0
ls: /Users/sam/Library/Messages: Operation not permitted
Even though it's unclear why I should need to sudo
, I try anyway
% sudo ls ~/Library/Messages
Password:
ls: /Users/sam/Library/Messages: Operation not permitted
but that fails as well.
How can I access ~/Library/Messages
(on Monterey)?
Update
Now Terminal
can access ~/Library
.
% ls ~/Library/Messages
Drafts
...
prewarm.db-wal
and I can set aside the existing ~/Library/Messages
% mv ~/Library/Messages ~/Library/Message-set-aside
but I still cannot rsync
rsync -avz /Volumes/bak/sam/Library/Messages /Users/sam/Library >> /tmp/messages-log 2>&1
as it yields
building file list ... done
Messages/
rsync: recv_generator: mkdir "/Users/sam/Library/Messages" failed: Operation not permitted (1)
*** Skipping everything below this failed directory ***
Hints?