"Operation not permitted" error

I have a handful of files on my 10.2 server that I cannot do anything with. Attempting to copy them fails, and trying to change ownership or permissions from the command line comes back with an "Operation not Permitted" error.

I've tried to apply chmod commands via sudo from within the OS as well as from Single User mode but the same error comes up each time. I was finally able to copy the files off using my laptop as the master and booting the server into target mode using a firewire cable.

Running a fsck command from Single User mode did not solve the problem. Any ideas as to the cause and solution?

Thanks,
Peter

Posted on Sep 2, 2005 11:35 PM

Reply
3 replies

Sep 3, 2005 11:17 AM in response to Peter Scordamaglia

Yes, I've tried (via sudo) both chmod and chown. However the ownership is already to a group that I have access to and the permission are already at 755. We first discovered this problem when the file owner tried to delete the files and got an error saying they were in use (generic error). When I looked at them I first ran my standard chmod/chown commands on it to take them over and then delete them and that is when this Operation not Permitted error came up. Since then I have rebooted the server and tried again (same problem), gone into Single User mode and ran fsck manually then tried, same error. I know from previous experience with a few files like this that from Single User mode I can force a deletion of the files, but I would like to know what the cause is and how to fix it without such drastic measures.

Thanks,
Peter

Sep 3, 2005 11:28 AM in response to Peter Bako

If the disk is ok (no errors from fsck), it's probably a matter of file flags, not owner/permissions.
So, try starting in single user mode (the schg flag can be toggled only this way), remount the volume read/write and issue something like this:

chflags noschg,nouchg THEFILE

This should be enough to let you then delete the file.

See 'man chflags' for details.

This thread has been closed by the system or the community team. You may vote for any posts you find helpful, or search the Community for additional answers.

"Operation not permitted" error

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