I have a mac that is running MAMP and on a web page I am trying to run the exec() php command below.
$output = array();
$result_code = 0;
$command = "echo /Applications/MAMP/bin/php/php7.4.21/bin/php -q " . DOCUMENT_ROOT . "/custom/massimport/scripts/massimport.php param1 param2 | at now 2>&1";
exec($command, $output, $result_code);
When I try to run this command, I get...
at: cannot open lockfile /usr/lib/cron/jobs/.lockfile: Operation not permitted
I added at, crontab, php, httpd all to the "Full Disk Access" of mac. I tried chaging the user permissions and owner and group on the lock file. But I cannot seem to get it to work.
Any ideas?