darkkillo.blogg.se

Mac command line list unmounted disks
Mac command line list unmounted disks






mac command line list unmounted disks

That's addressed in rdamazio's answer.įollowing previous good answers, that are regretfully outdated, I looked at a modern MacOS (Monterey 12.0.1) version of the TCC database, and finally found the following command: sudo sqlite3 /Library/Application\ Support//TCC.db 'select client,auth_value from access where service = "kTCCServiceSystemPolicyAllFiles"' I can't run the command from vscode but it works from iTerm because that's how my permissions are set up.

#Mac command line list unmounted disks full

If you get the error Error: unable to open database "/Library/Application Support//TCC.db": authorization denied and any other file operations on the TCC.db file all fail, your terminal app itself is missing the full disk access permission required to read the DB file. On older versions of macOS (before 11.6) the auth_value column was named allowed so you might need to adjust the query.

mac command line list unmounted disks

and it will list the apps that are unchecked in the policy dialog. If you're interested, you can invert the query to. (Updated answer based on Shneor answers, thanks! On their answer they note that auth_value is an int and not a bool, but the WHERE filter still works.) Will list out the apps and binaries that are allowed Full Disk Access, i.e.: /usr/libexec/atrun 'select client from access where auth_value and service = "kTCCServiceSystemPolicyAllFiles"' So the query: sqlite3 /Library/Application\ Support//TCC.db \

mac command line list unmounted disks

The service column will be kTCCServiceSystemPolicyAllFiles for Full Disk Access. Building on answer, the sqlite DB does have the answer for which permission is granted.








Mac command line list unmounted disks