Imported from the Apple Support Forums via the Wayback Machine 🔗
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?
Imported from the Apple Support Forums via the Wayback Machine 🔗
Did you try to change the owners with chown? Check who owns them with a ls -l and then if you are not the owner nor in the group that owns them then change them with
chown yourshorhame:yourgroup filename
that should be all you need to do (also you will most likely need to do this as root/superuser so run it sudo chown etc etc)
0
Peter Bako·
Imported from the Apple Support Forums via the Wayback Machine 🔗
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
0
nicola moretti·
Imported from the Apple Support Forums via the Wayback Machine 🔗
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.