Provide access to ~/Messages folder to rsync?

I'm running Catalina, and I have a launchd job that runs an rsync script that backs up my Messages to a server over ssh. It effectively runs this command:


/usr/bin/rsync -av --stats /Users/jay/Library/Messages/ Home.local:/Groups/Archive/Messages/Messages/ --exclude chat.db*


Now, I have given Terminal "Full Disk Access", so this command runs fine when I run it manually in Terminal, but when I load the launchd job, I get this output in system.log:


"building file list ... rsync: opendir "/Users/jay/Library/Messages/." failed: Operation not permitted (1)"


If I REMOVE "Full Disk Access" from Terminal and try to manually run the command, I get the same error. When I look in System Preferences → Security & Privacy → Privacy, there does not seem to be an option for adding processes for Messages. I don't think it's wise to grant Full Disk Access to rsync.


So, how do I grant access to the Messages folder to rsync when being run by launchd? Do I have to grant Full Disk Access to rsync?

Posted on Feb 2, 2020 11:28 PM

Reply

Similar questions

2 replies

Feb 3, 2020 5:10 AM in response to jaydisc

Do I have to grant Full Disk Access to rsync?


I think so, because rsync is the controlling process. I can't think of anything else that would prevent it from working.


If you post the entire launchd job I'll try to confirm it works. Your Terminal command definitely works but I did not need to grant full disk access to it, so that's sort of a mystery.

Feb 3, 2020 3:55 PM in response to John Galt

Thanks. I thought that Catalina managed access to the ~/Messages folder similarly to the way it did Calendars, Contacts, Downloads, Desktop, etc. I was hoping to ONLY give rsync access to ~/Messages. As you say, giving rsync Full Disk Access enabled the launchd job to work.


I don't need to give Terminal.app Full Disk Access, but by doing so, I don't have to individually give access to tons of individual binaries.

This thread has been closed by the system or the community team. You may vote for any posts you find helpful, or search the Community for additional answers.

Provide access to ~/Messages folder to rsync?

Welcome to Apple Support Community
A forum where Apple customers help each other with their products. Get started with your Apple Account.