Submit Hint Search The Forums LinksStatsPollsHeadlinesRSS
14,000 hints and counting!

Click here to return to the 'file permissions and flags' hint
The following comments are owned by whoever posted them. This site is not responsible for what they say.
file permissions and flags
Authored by: sjk on Mar 15, '04 06:31:19PM

There are several ways root can modify a write-protected file without changing its permissions, such as with output redirection ("echo foo > file") or with a text editor (which may prompt to overwrite read-only permission).

You can set a file's immutable flag to keep it from being modified, moved, deleted or having its permissions changed. Setting a file's system immutable flag is the most extreme because it can only be unset when the system is in single-user mode.

The Locked checkbox in a Finder Info window sets/clears the user immutable flag. The chflags command can set/clear others.

See "man chflags" and "man 2 chflags" for basic info about the different file flags.

I don't recommend using these unless you *really* understand the possible consequences.

[ Reply to This | # ]