sethgoldin / davinci-resolve-postgresql-workflow-tools

Effortlessly set up automatic backups and automatic optimizations of DaVinci Resolve Studio's PostgreSQL databases
Other
80 stars 11 forks source link

Some sort of permissions issue on Big Sur is preventing the agents from having permission to run the backup and optimize shell scripts #23

Closed sethgoldin closed 1 year ago

sethgoldin commented 3 years ago

When running the .sh scripts manually, not through the LaunchAgent, I see: pg_dump: [custom archiver] could not open output file "/Users/testuser/Desktop//test1_2021_03_10_11_24.backup": Permission denied

Giving Terminal Full Disk Access doesn't resolve the issue.

This is on macOS Big Sur 11.2.2.

The .backup file that gets generated is 0 bytes, and the logs aren't getting touched.

sethgoldin commented 3 years ago

I believe this is related to some new security measures in Big Sur: https://github.com/PostgresApp/PostgresApp/issues/610

However the DaVinci Resolve Project Server 17.1 app is indeed able to backup and optimize successfully, according to its GUI.

This apparently works after giving permissions to ~/Documents, ~/Desktop, and ~/Downloads.

sethgoldin commented 3 years ago

Right now this script calls the tools inside of the /Library/PostgreSQL/9.5/pgAdmin3.app/Contents/SharedSupport, and while I suppose I could recommend giving "full disk access" to the particular binaries, it's probably better just to give the tools read and write access just to whatever directory is being used. It's not immediately clear to me how to do this from the macOS GUI, but I'll poke around.

sethgoldin commented 3 years ago

One other option might be to use the binaries out of /Library/PostgreSQL/9.5/bin, instead of /Library/PostgreSQL/9.5/pgAdmin3.app/Contents/SharedSupport, but I'm not sure if these are the same.

sethgoldin commented 1 year ago

Can't really replicate this on macOS Ventura now, when testing version 2.0 of the tools for PostgreSQL 13 for Resolve 18. But also, we're using the binaries in /Library/PostgreSQL/13/bin/, and not the ones buried inside the pgAdmin app now.

So just going to close this out. Won't fix this.

sethgoldin commented 1 year ago

Thinking this must be related to this: https://github.com/sethgoldin/davinci-resolve-postgresql-workflow-tools/issues/31