

Now, it's Copy, keep them selected, Attributes, clear uf_immutable, Delete.

It's even encouraged by Apple as per this document, you can Lock a text file right from the document title when editing it. I come up upon user locked documents somewhat often when supporting users (and cleaning up some file storage mess). People use them in Finder on important documents as unlike permissions, the uchg flag is easily accessible from Finder "Get info" window, inherently more understandable to laic users than permissions and the user has less chance to mess up. The Locked checkbox in Finder (and the corresponding uchg flag) is used similar to Read-only file attribute under Windows, to prevent an accidental deletion or overwrite of an important file by the user, without potentially messing up permissions.

I am of course only talking about the Read-only (FAT/FAT32/exFAT) and User Immutable (uf_immutable, uchg) flags only, not the system file flags or access permissions. Various context of file operations and file sources, I'll list a few examples. User should be always able to override any Read Only flags on files he has access permissions to, whatever the filesystem, unlike not having permissions (since flags are below access permissions and user already has access/R/W permissions to the file in order to set the flag in the first place). Same as with Read Only file attributes on FAT filesystems. Warn user - Skip/Skip all/Overwrite (all) or Delete (all) anyway/Abort, just like when overwriting any normal existing file. Retry or delete obviously does nothing.Įrror message is confusing, it says "couldn't be saved because you don't have permission" but issue is not permissions, it's flags.Ģ. Error: The file couldn't be saved because you don't have permission. This is different from insufficient user access permissions, this is a flag set in File Info dialog ("locked" tickbox) or via the chflags uchg terminal command and requires user access permission to be able to set or reset in the first place.Ĭurrent behaviour: Failed to move an item to Trash.

Files that have the locked ( uchange) flag set can't be deleted.
