{
  "id": 13069807,
  "title": "My Scheduled Job Died With 'Operation not permitted' — The File Was Fine, the Process Wasn't",
  "url": "https://urgent.news/2026/10/09/my-scheduled-job-died-with-operation-not-permitted-the-file-was-fine",
  "topic": "tech",
  "section": "Tech",
  "published": "2026-10-09T08:32:03.000Z",
  "source": {
    "name": "Dev.to",
    "slug": "dev-to",
    "url": "https://dev.to/samhartley_dev/my-scheduled-job-died-with-operation-not-permitted-the-file-was-fine-the-process-wasnt-2g5k"
  },
  "original_language": "en",
  "account": "A scheduled Python scanning job on a Mac mini stopped functioning, repeatedly restarting with an \"Operation not permitted\" error. The file the job needed was present and accessible, yet the process running the job was denied permission to access it. The initial investigation focused on the file's ownership, permissions, and the NAS, but the issue lay elsewhere. The root cause was the job running under a process that lacked the necessary Full Disk Access grant from macOS's sandbox extension, despite the user having full access to the files. The error stemmed from macOS's Transparency, Consent, and Control (TCC) mechanism, which denied the process the right to be granted permission. The Node process running the scanner had received Full Disk Access, while the launchd job, which ran bash, did not inherit this permission. As launchd runs jobs as children of itself, the interpreter that launched the job lacked the necessary grant, causing the job to fail while other processes with different ancestors could access the files. The fix was to grant Full Disk Access to the interpreter that launched the job, in this case, /bin/bash. Once this permission was granted, the job resumed functioning correctly. This incident highlights the importance of understanding operating system permissions and sandbox extensions, as well as the potential impact of binary updates on granted permissions.",
  "summary": "My Scheduled Job Died With 'Operation not permitted' — The File Was Fine, the Process Wasn't I have a Mac mini in a closet that runs a small Python scanner on a schedule. The code lives on a network volume, the job runs under launchd , and it had been fine for months. Then one morning it was in a loop, restarting every few seconds, spitting this: /bin/bash: /Volumes/turgay/.../start_scanner.sh:…",
  "key_points": [
    "Scheduled Python job failed with \"Operation not permitted\" error on Mac mini",
    "Issue stemmed from missing Full Disk Access grant for launchd job",
    "Granting /bin/bash Full Disk Access resolved the job's functionality"
  ],
  "editors_take": null,
  "illustration": null,
  "coverage": {
    "outlets": 1,
    "also_reported_by": []
  },
  "ai_generated": true,
  "disclaimer": "Summaries, key points and the editor’s take are written by software from other outlets’ reporting and may contain errors — always check the linked original."
}