Problem:

Bitdefender blocks python from Mac Terminal or Jupyter notebook from writing files to protected folders even you allowed it.

I used to be able to do this but lately, I cannot.

Steps:

  1. I created an "unprotected" folder named "Test". In an unprotected folder, there is no problem. See screenshot

    1. I run a Python script from the terminal to write a file. No problem

      https://s3-us-west-2.amazonaws.com/secure.notion-static.com/f59d47c4-96f0-4bd7-af34-30527e6f4da3/Untitled.png

    2. I run python from a Jupyter notebook to write a file. No problem.

      https://s3-us-west-2.amazonaws.com/secure.notion-static.com/bb9796b7-da70-4569-9584-36ddc0134b77/Untitled.png

    3. I run the same script I used in the Jupyter from Python directly. No problem.

      https://s3-us-west-2.amazonaws.com/secure.notion-static.com/76e161d1-5e84-4144-967f-edc71b290bc0/Untitled.png

  2. However, when I do the same thing in a "protected" folder, but I get permission errors. Even when they have permissions under Bitdefender.

    1. Terminal and Python are configured to be "Allowed"

      https://s3-us-west-2.amazonaws.com/secure.notion-static.com/c0b9be65-b5c9-46b7-9f51-45136f4ab470/Untitled.png

      https://s3-us-west-2.amazonaws.com/secure.notion-static.com/55e91295-3afc-4492-a58a-bec6f5e4c516/Untitled.png

    2. I run a Python script from the terminal to write a file. Operation Not Permitted Error

      https://s3-us-west-2.amazonaws.com/secure.notion-static.com/6ff362e8-b708-4ef5-a43e-832d162186b5/Untitled.png

    3. I run python from a Jupyter notebook to write a file. I cannot even create the notebook.

      https://s3-us-west-2.amazonaws.com/secure.notion-static.com/1e9bb579-5271-4549-bdec-e4b13c893e7d/Untitled.png

    4. I run the same script I used in the Jupyter from Python directly. No problem.

      https://s3-us-west-2.amazonaws.com/secure.notion-static.com/007447d9-f2fe-4459-82eb-8562fcf4c0b4/Untitled.png

Notes:

Conclusion