Become a MacRumors Supporter for $50/year with no ads, ability to filter front page stories, and private forums.

danallen

macrumors regular
Original poster
Oct 8, 2018
133
36
Houston
Having a problem accessing files on a certain drive from within cron running a bash script. The same script runs fine from command line. I wam wondering if cron runs under a different shell than bash and if that is the problem. Only one ssd is affected.



Here is my unsupported MAC running Catalina

1569511185523.png



This probably is just me being a bonehead, but I did not have this problem before upgrading to Catalina.


I spent the last two hours smashing my head with a brick. I'm trying to get some Bash Scripts to run from cron. It looks like the problem is the Scripts running in cron don't want to access AHCI SSD files for read or write. Any ideas on cause or fix?


This picture shows the volume I cannot access with bash scripts running out of cron.
1569511209709.png



This is cron, with the error thrown to /.tmp/stderr.log

1569511266671.png


ERROR:
Here, the file called by cron gets the "Operation not permitted" error:
1569511286515.png




Moved the script to a different type volume,. a partition on another device instead of APFS volume on a SSD which the system sees as a removable drive. The script still references files on the SSD. The file will start running out of cron, but it dies when the script tries accessessing a file on the SSD.

1569511351569.png


So now the script starts running, but dies when it has to access a file on the SSD. Problem appears only in cron
1569511578730.png


So, it seems as if the scripts will not run out of cron.

Scripts are attached.
 

danallen

macrumors regular
Original poster
Oct 8, 2018
133
36
Houston
Thank you for the reference. I posted over there. I am getting the same error, slightly more narrow conditions. I have bash scripts running unless it is accessing files on a pcie ssd when the script invoked by cron. I suspect zsh is a factor.
 
Register on MacRumors! This sidebar will go away, and you'll see fewer ads.