univ-of-utah-marriott-library-apple/privacy_services_manager

OperationalError: attempt to write a readonly database after the latest OSX 10.12 update (Beta)

ikorin opened this issue · 4 comments

privacy_services_manager.py add accessibility /Applications/myApp.app
INFO: ################################################################################
Privacy Services Manager, version 1.6.10

service:  accessibility
action:   add
app(s):   ['/Applications/myApp.app']
user:     N/A
template: False
language: N/A

INFO: Set to modify global permissions for all users at '/Library/Application Support/com.apple.TCC/TCC.db'.
INFO: Inserting 'com.myApp.myApp' in service 'accessibility'...
ERROR: OperationalError: attempt to write a readonly database

Hello Igor:

Sorry for the late response, thanks for the email. We will investigate the issue and get back to you on status.

On Sep 6, 2016, at 2:22 PM, Igor Korin notifications@github.com wrote:

privacy_services_manager.py add accessibility /Applications/myApp.app
INFO: ################################################################################
Privacy Services Manager, version 1.6.10

service: accessibility
action: add
app(s): ['/Applications/myApp.app']
user: N/A
template: False
language: N/A

INFO: Set to modify global permissions for all users at '/Library/Application Support/com.apple.TCC/TCC.db'.
INFO: Inserting 'com.myApp.myApp' in service 'accessibility'...
ERROR: OperationalError: attempt to write a readonly database


You are receiving this because you are subscribed to this thread.
Reply to this email directly, view it on GitHub, or mute the thread.

Thanks:

Richard Glaser
University of Utah, Marriott Library ITS
richard.glaser@utah.edu

Has a fix for this been found?

Not necessarily a fix, so much as a work-around:
Since macOS 10.12, /Library/Application Support/com.apple.TCC/TCC.db is protected by SIP, so no modifications can be made to the file using privacy_services_manger unless 1 of 2 things occur:

  1. Disable SIP
  2. Boot to the Recovery Partition and run rm -rf /Volumes/Macintosh\ HD/Library/Application\ Support/com.apple.TCC

After performing one of these 2 steps, privacy_services_manager.py will continue to work normally (although if you follow step 2, it will be reverted back to SIP protection after an OS upgrade)

I've been trying to get some documentation in place as well as a workflow that will make this more explicit, but other tasks have stalled my progress on this.