I want to check if a certain app is allowed to control my computer from the terminal. I need to check Privacy > accessibility settings to do that. How do I check-- where are accessibility settings stored?


The database is located at /Library/Application Support/com.apple.TCC/TCC.db.

To query the database from the command line, use sqlite3.

  • You can query what access a certain app has.

    sqlite3 /Library/Application\ Support/com.apple.TCC/TCC.db \
      'select service from access where client like "com.apple.Terminal"
        and auth_value = 2;'
  • You can query what apps have access to a certain permission like accessibility.

    sqlite3 /Library/Application\ Support/com.apple.TCC/TCC.db \
      'select client from access where service like "kTCCServiceAccessibility"
        and auth_value = 2;'

To perform these queries, Terminal needs full disk access (kTCCServiceSystemPolicyAllFiles).

Replace auth_value = 2 with allowed = 1 if on an older macOS like High Sierra (not sure at which point it changed between High Sierra and Big Sur).

  • With this I'm getting this error: Error: no such column: auth_value – 210312312 Feb 21 at 22:42
  • @210 What version of macOS are you on? This was only tested on the latest Big Sur 11.3b2. – grg Feb 21 at 22:48
  • I'm on High Sierra 10.13.6 – 210312312 Feb 21 at 22:52
  • @210 Figured it out, edited answer! Sorry for the delay – grg Feb 28 at 9:43
  • 1
    @210 No, the structure of the database is different – grg Feb 28 at 20:40

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .