You can make a difference in the Apple Support Community!

When you sign up with your Apple Account, you can provide valuable feedback to other community members by upvoting helpful replies and User Tips.

Looks like no one’s replied in a while. To start the conversation again, simply ask a new question.

How to get rid of "Operation not permitted" in the terminal

Hi,


I have uploaded files (pdf, mp4, png) to Drive and now almost none of them work, neither when I try to open them in the Drive desktop app nor in the web version. I have even tried downloading the files into my Macbook (Pro w/ Ventura 13.2) Downloads and opening them from there and it says the file cannot be opened because it may be damaged.


The closest think I find on Google's own guide says:

If you use Drive for desktop on MacOS Mojave or High Sierra, permissions required to sync Drive files can get corrupted.

To resolve this issue:

  1. On your computer, click Finder Applications.
  2. Open the Utilities folder.
  3. Click Terminal.
  4. Enter sudo kextcache -clear
  5. Press Return.
  6. Enter sudo mv /private/var/db/KernelExtensionManagement /private/var/db/KernelExtensionManagementBackup
  7. Press Return.
  8. Enter sudo kextutil -l /Library/Google/DriveFS/dfsfuse.kext
  9. Press Return.
  10. Launch Drive for desktop.


When I try to do point 6, the terminal says: "Operation not permitted"

I have already done the granting full access to terminal but it's not working. I don't find any other way to open the files.


Any ideas please? I got 300 files that have taken me hours to download and arrange. Would be great to skip doing it all again.


All the best

MacBook Pro 13″, macOS 13.2

Posted on Jan 31, 2023 2:41 PM

Reply

Similar questions

2 replies

Jan 31, 2023 3:18 PM in response to SimplyNewbie

The /private/var folder path is on the System read-only filesystem and you do not have permission to write (what you are really doing with a /bin/mv command) there. You might have been able to pull this off on an older (e.g. Mojave) version of macOS where the System partition was not protected, but with Catalina and later, you have no access privilege, even with Full Disk Access.


Unless you really know what you are doing in the Terminal, you should not be following third-party vendor instructions that encourage intrusion into the operating system and clearing kernel extension caches.


What you can do is:


  1. Reboot your Mac into Safe Boot mode, and then reboot normally.
  2. Get the most current version of the Google Mac Desktop application that they confirm is compatible with macOS Ventura, and try accessing your files from it.



How to get rid of "Operation not permitted" in the terminal

Welcome to Apple Support Community
A forum where Apple customers help each other with their products. Get started with your Apple Account.