the file document.pdf couldn't be opened because you don't have permission to view it

I am the developer of a 4D app that runs on MacOS 13.2 Ventura, that monitors an SFTP upload folder, and processes the uploaded documents, including printing them using an OSAScript from within the 4D app.

This app was working correctly for years on earlier MacOS versions.

Upon launching the pdf with OSAScript the MacOS shows an error message:

4D Server has been set to Full Disk Access, and so has Preview. 4D Server has been added to the list of apps in the Allow applications to use developer tools.

If I double click the PDF document, preview opens it.

Launching the PDF from within 4D Server shows the error.

The SFTP uploads are done in a different User account than the 4D Server is running in. Copying the uploaded PDFs make the copied file owner the 4D Server user account, but OSAScript still won't launch the copied PDF.

How do I fix this?

General text of the OSASCRIPT

osascript - tell application "Finder" print "+$Path_Doc_t+" as alias end tell

I did a work-around, created an Automator app that finds the input document, and prints it with Preview, bypassing the privacy and security issues of Ventura.

Case closed.

the file document.pdf couldn't be opened because you don't have permission to view it
 
 
Q