File locked and cannot change owner or permissions

Unix in OS X has a file flag that is unmutable meaning that you can not change the file properties such as ownership, permissions or delete. You can verify this by issuing the list command with the -aole modifiers

ls -aole

and see the “unchg” in the file listing like below.

rwxr-xr-x  29 me  staff  uchg  986 May 17 11:39 myfilename

To remove this flag and allow for file property modification, use the chflags command in the following:

chflags nouchg [myfilename]

where [myfilename] is the name of the file to modify. You will need to be owner, administrator or super user to issue this command on this file.

file_locked_and_cannot_change_owner_or_permissions.txt · Last modified: 2010/06/12 16:25 by wizard