Original
------To set hidden permissions on the file through chattr------
[[Email protected] ~] #chattr--help
usage:chattr [-RV] [-+=aacddijssu] [-V version] files ...
Parameter or Option Description:
-R: Recursively handles all files and subdirectories under the specified directory.
-V: Shows the detailed procedure has a version number.
-V: Sets the file or directory version (versions).
+: On the basis of the original parameter setting, append the parameter.
-: Remove parameters based on the original parameter setting.
=: Updated to specify parameter settings.
A: Atime (access time) of a file or directory cannot be modified (modified), which can effectively prevent the occurrence of disk I/O errors such as laptops.
S: HDD I/O sync option, similar to sync.
A: Append, after setting this parameter, can only add data to the file, not delete, more for the server log file security, only root can set this property.
C: Compresse, set whether the file is compressed and then stored. An automatic decompression operation is required for reading.
D: No dump, the settings file cannot be the backup target of the dump program.
I: The settings file cannot be deleted, renamed, linked, and cannot be written or added. The I parameter is useful for file system security settings.
J: Journal, set this parameter so that when the file system is mounted via the Mount parameter: data=ordered or Data=writeback, the file is recorded (in journal) when it is written. If the filesystem parameter is set to Data=journal, the parameter is automatically invalidated.
S: Delete files or directories confidentially, that is, the hard disk space is fully recovered.
U: In contrast to S, when set to U, the data content actually exists in the disk and can be used for undeletion.
A and I are commonly used in the various parameter options. The A option enforces that only non-removable, multi-log system security settings can be added. While I is a more stringent security setting, only superuser (root) or processes with cap_linux_immutable processing power (identity) can apply this option.
You need to use the LSATTR command when viewing------------
LSATTR command format:
[[Email protected] ~] #lsattr [-RVADLV] [files ...]
Parameter or Option Description:
-R: Recursively lists directory and file attributes.
-V: Displays the program version number.
-A: Displays all file attributes, including hidden files (.), the current directory (./), and the upper-level directory (. /)。
-D: Lists only the directory properties.
-L: (this parameter does not currently have any effect).
-V: Displays the file or directory version.
Linux Hidden permissions