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 do I delete a locked file - options greyed out.

Hi. Sometime ago I transferred a pdf file from another of my macbooks to my new macbook.


I've been trying to delete the pdf file but with no success.


I get the following error message.


The operation can’t be completed because you don’t have permission to access some of the items.


I tried the Command I and tried to change the options there but its greyed out. I'm still listed as the admin in the file.


I tried using the Terminal to delete it using the rm command but I get the error messages "Operation not permitted"


Surely, there has to be an easy way to remove a small file sitting on my macbook desktop for months already.

I'm using a Macbook Pro (2018 model) Big Sur



MacBook Pro 15″, macOS 11.2

Posted on May 17, 2021 9:31 PM

Reply
Question marked as Top-ranking reply

Posted on May 18, 2021 6:00 AM

There are two lock settings:

  1. The user-settable Lock selection in the Get Info panel
  2. A System applied immutable lock preventing user change in the Get Info panel, and controlled from the Terminal. This will display as a grayed-out Lock selection in that panel:
sudo chflags schg ./foo.txt.   # set system lock
sudo chflags noschg ./foo.txt  # remove the system lock


In older versions of macOS, the System immutable lock would superimpose a small lock on the file icon, but not in Big Sur. Also, in the Terminal, you can see what flags have been set on a file with the following:


ls -Ol ./foo.txt


A user lock will show as uchg and a System lock as schg.


See what chflag(1) is set on your PDF, and unset it accordingly.

Similar questions

2 replies
Question marked as Top-ranking reply

May 18, 2021 6:00 AM in response to smoothcoffee68

There are two lock settings:

  1. The user-settable Lock selection in the Get Info panel
  2. A System applied immutable lock preventing user change in the Get Info panel, and controlled from the Terminal. This will display as a grayed-out Lock selection in that panel:
sudo chflags schg ./foo.txt.   # set system lock
sudo chflags noschg ./foo.txt  # remove the system lock


In older versions of macOS, the System immutable lock would superimpose a small lock on the file icon, but not in Big Sur. Also, in the Terminal, you can see what flags have been set on a file with the following:


ls -Ol ./foo.txt


A user lock will show as uchg and a System lock as schg.


See what chflag(1) is set on your PDF, and unset it accordingly.

How do I delete a locked file - options greyed out.

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