chattr
From Wikipedia, the free encyclopedia
| This article or section includes a list of references or external links, but its sources remain unclear because it lacks in-text citations. You can improve this article by introducing more precise citations. |
chattr is a Unix command that allows a user to set certain attributes to a file. Mostly chattr is used to make files immutable so that password files and certain system files cannot be erased during software upgrades.[1]
The form of the chattr command is:
chattr [-RV] [-+=AacDdijsSu] [-v version] files
where
-Ris to recurse all subdirectories+iis to set the immutable bit to prevent even root from erasing or changing the contents a file.
Note: The superuser can't erase or write on the file, but he or she can set or unset the i attribute.
On modern BSD systems (including Mac OS X) the equivalent command is chflags.
[edit] Attributes
Some attributes include:
|
|
|
Details of the attributes can be found in the chattr man page.[2]
[edit] See also
lsattr– view file attributeschown– change file/directory ownershipchmod– change Unix access control attributescacls– Microsoft Windows NT file system ACL control utilityattrib– available on DOS, OS/2 and Microsoft Windows
|
||||||||||||||||||||||||||
[edit] References=
- ^ – OpenBSD General Commands Manual
- ^ chattr man

