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

Cannot delete locked file

having issues with this locked file I'm trying to delete. When I "Get Info" on the file and try to uncheck the "Locked" button, it will not let me. The check mark just remains. Its on our server and it was worked on by some other designers. Could that be an issue? Because I have privilages to delete image files on the server, but for some reason, it wont let me delete this one. Quite annoying.

User uploaded file

User uploaded fileIm

MacBook Pro, Mac OS X (10.6.7)

Posted on Dec 16, 2011 9:56 PM

Reply
29 replies

Dec 20, 2011 5:17 PM in response to jizzlets

jizzlets wrote:


ohh, i didnt read that thread. i did the rm thing, but it wouldnt allow me to enter my password. when i type my password, the cursor doesnt move. i tried 3 times and nothing.


If you reread what I suggested in that post I said when you enter the password it won't be echoed. It's a security feature to protect from prying eyes.

Dec 21, 2011 1:18 PM in response to jizzlets

There was no promt for your password this time? Or had you tried entering your password to a a previous attempt within the last 5 minutes or so. That's about how long sudo remembers your password (by default unless changed).


Next thing to try.


sudo chflags nouchg path-to-file


I assume you got the hang of how to set the path to the file by now with terminal so I won't mention that again.


Assuming this doesn't produce an error, just to check, do the ls -lO again to see that it doesn't show uchg just before the file size. If it doesn't try the sudo rm -f again.

Dec 21, 2011 1:24 PM in response to jizzlets

Well, that shows the problem...


The file has the 'uchg' flag set, which marks the file as unchangeable. This supersedes the normal access privileges to prevent the file being deleted.


The solution is simple - remove the 'uchg' flag via the 'chflags' command:


sudo chflags nouchg /path/to/file


then you should be able to delete it using the standard methods.

Dec 21, 2011 5:29 PM in response to jizzlets

Presumably this file is on a mounted volume called "Data". If you do a finder get info on the Data volume is there a checkbox at the bottom of the get info window that says "Ignore ownership on this volume"?. Is it checked? If not can you click the lock on the bottom right to enable the checkbox and check it? If so try the chflags (and rm) again.


If this doesn't work I'm out of ideas other than you (or someone) will have to physically get on to that server machine and try to delete it from there.

Cannot delete locked file

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