{"action":"created","issue":{"url":"https://api.github.com/repos/restic/restic/issues/2051","repository_url":"https://api.github.com/repos/restic/restic","labels_url":"https://api.github.com/repos/restic/restic/issues/2051/labels{/name}","comments_url":"https://api.github.com/repos/restic/restic/issues/2051/comments","events_url":"https://api.github.com/repos/restic/restic/issues/2051/events","html_url":"https://github.com/restic/restic/issues/2051","id":371191338,"node_id":"MDU6SXNzdWUzNzExOTEzMzg=","number":2051,"title":"MacOS Mojave: error: Open: ... operation not permitted","user":{"login":"n8henrie","id":1234956,"node_id":"MDQ6VXNlcjEyMzQ5NTY=","avatar_url":"https://avatars1.githubusercontent.com/u/1234956?v=4","gravatar_id":"","url":"https://api.github.com/users/n8henrie","html_url":"https://github.com/n8henrie","followers_url":"https://api.github.com/users/n8henrie/followers","following_url":"https://api.github.com/users/n8henrie/following{/other_user}","gists_url":"https://api.github.com/users/n8henrie/gists{/gist_id}","starred_url":"https://api.github.com/users/n8henrie/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/n8henrie/subscriptions","organizations_url":"https://api.github.com/users/n8henrie/orgs","repos_url":"https://api.github.com/users/n8henrie/repos","events_url":"https://api.github.com/users/n8henrie/events{/privacy}","received_events_url":"https://api.github.com/users/n8henrie/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"assignees":[],"milestone":null,"comments":7,"created_at":"2018-10-17T17:39:12Z","updated_at":"2018-10-18T02:40:33Z","closed_at":null,"author_association":"NONE","body":"MacOS Mojave's privacy features seem to limit restic access to files (at least that what seems to be happening), I'm getting permissions errors that I didn't get prior to upgrading.\r\n\r\nMacOS 10.14\r\n\r\nRunning with sudo:\r\n\r\n```\r\ncan not obtain extended attribute com.apple.rootless for /Library/Application Support/com.apple.TCC\r\nerror: Open: open /Library/Application Support/com.apple.TCC: operation not permitted\r\nerror: open /Library/Preferences/com.apple.TimeMachine.plist: operation not permitted\r\n```\r\n\r\n... many other files.\r\n\r\nOutput of `restic version`\r\n--------------------------\r\n\r\n0.9.2 (most recent in homebrew)\r\n\r\nHow did you run restic exactly?\r\n-------------------------------\r\n\r\nSame bash script I've been using for months prior to upgrading to Mojave, run with root privileges.\r\n\r\n```bash\r\nRESTIC_PASSWORD_FILE=\"/path/to/file.txt\" \\\r\nHOME=\"/path/to/homedir\" \\\r\n/usr/local/bin/restic \\\r\n    --repo sftp:myserver.local:my/repo/path \\\r\n    --option='sftp.command=ssh -p REDACTEDPORT -i REDACTEDKEYFILE -o identitiesonly=yes -l restic myserver.local -s sftp' \\\r\n    --exclude-file=\"${DIR}/global-exclude.txt\" \\\r\n    --exclude-if-present='.norestic' \\\r\n    backup \\\r\n    --cleanup-cache \\\r\n    / \\\r\n    &>> /path/to/file.log\r\n```\r\n\r\nWhat backend/server/service did you use to store the repository?\r\n----------------------------------------------------------------\r\n\r\nsftp, as per above. Same repo as previous.\r\n\r\nExpected behavior\r\n-----------------\r\n\r\nHopefully reads and backs up all files when run as root (realizing this may not be a restic issue, but seems like it's certainly a problem for backups).\r\n\r\nActual behavior\r\n---------------\r\n\r\nas per above\r\n\r\nSteps to reproduce the behavior\r\n-------------------------------\r\n\r\n`sudo bash restic-backup.sh` (script above)\r\n\r\nDo you have any idea what may have caused this?\r\n-----------------------------------------------\r\n\r\nMy guess: \r\n\r\n- https://eclecticlight.co/2018/09/06/working-with-mojaves-privacy-protection/\r\n- https://eclecticlight.co/2018/09/17/managing-mojaves-privacy-protection-privacy-controls/\r\n- https://forums.developer.apple.com/thread/108348\r\n\r\nDo you have an idea how to solve the issue?\r\n-------------------------------------------\r\n\r\nNo. What I've tried so far:\r\n\r\n- No libcap on MacOS, so can't use `setcap`.\r\n- Tried adding restic to \"Full Disk Access\" in the new System Preferences -> Security and Privacy pane, no luck.\r\n\r\nDid restic help you or made you happy in any way?\r\n-------------------------------------------------\r\n\r\nAfter years of trying to find a good, reliable, scriptable, open source backup solution, it's the only one that fits the bill. So grateful!"},"comment":{"url":"https://api.github.com/repos/restic/restic/issues/comments/430855669","html_url":"https://github.com/restic/restic/issues/2051#issuecomment-430855669","issue_url":"https://api.github.com/repos/restic/restic/issues/2051","id":430855669,"node_id":"MDEyOklzc3VlQ29tbWVudDQzMDg1NTY2OQ==","user":{"login":"mholt","id":1128849,"node_id":"MDQ6VXNlcjExMjg4NDk=","avatar_url":"https://avatars2.githubusercontent.com/u/1128849?v=4","gravatar_id":"","url":"https://api.github.com/users/mholt","html_url":"https://github.com/mholt","followers_url":"https://api.github.com/users/mholt/followers","following_url":"https://api.github.com/users/mholt/following{/other_user}","gists_url":"https://api.github.com/users/mholt/gists{/gist_id}","starred_url":"https://api.github.com/users/mholt/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/mholt/subscriptions","organizations_url":"https://api.github.com/users/mholt/orgs","repos_url":"https://api.github.com/users/mholt/repos","events_url":"https://api.github.com/users/mholt/events{/privacy}","received_events_url":"https://api.github.com/users/mholt/received_events","type":"User","site_admin":false},"created_at":"2018-10-18T02:40:33Z","updated_at":"2018-10-18T02:40:33Z","author_association":"CONTRIBUTOR","body":"(After reading some of that thread) My goodness. This is super annoying. Thanks for looking into it! I'll keep investigating too once I upgrade..."}}
{"actor":{"display_login":"mholt"}}