tccutil - macOS


Overview

tccutil is a versatile command-line tool tailored specifically for managing application access to user data and privacy-sensitive resources on macOS. It allows users to grant or revoke permissions for specific applications to access various system features, such as location, camera, microphone, and more.

Syntax

tccutil [options] category [target] [parameters]

Options/Flags

  • -s, –show: Displays the current access settings for the specified category.
  • -g, –grant: Grants access for the target application to the specified category.
  • -r, –remove: Revokes access for the target application from the specified category.
  • -a, –allow: Alias for -g.
  • -d, –deny: Alias for -r.
  • -p, –prompt: Requests user input to grant or revoke access.
  • -l, –list: Lists all registered categories.
  • -c, –clear: Clears all access settings for the specified category or target.
  • -a, –all: Operates on all registered categories or targets.
  • -vv, –verbose: Displays detailed diagnostic information.

Examples

Grant access to the microphone for “Audio Recorder”:

tccutil microphone allow com.example.AudioRecorder

Revoke access to the camera for “Video Capture”:

tccutil camera deny com.example.VideoCapture

List all registered categories:

tccutil -l

Clear all access settings for the “Camera” category:

tccutil camera clear

Common Issues

  • Permission denied: Ensure the target application has the necessary permissions to access the requested category.
  • Category not registered: Verify that the specified category is supported by the system.
  • Access already granted: The target application may already have access to the requested category.

Integration

  • Automator: Create workflows to automate permission management tasks.
  • AppleScript: Use the system command to execute tccutil from scripts.
  • Bash: Write custom scripts to manage permissions programmatically.
  • Privacy & Security preferences: Accesses a GUI for managing application permissions.
  • spctl: Controls the installation and execution of software on macOS.
  • codesign: Verifies the validity of code signatures for applications.