Hidden file attributes

Hidden file attributes

  Linux system files in addition to the general rights and have special privileges, there is a hidden authority, ie hidden permissions, the user can not directly be found by default. Users have encountered in a production environment and RHCE exams are too obviously sufficient rights situation but can not delete a file, or only the additional content in the log file but can not modify or delete content, which prevents some extent, hackers tampering with the system log plot, so this "strange" documents also protect the security of Linux systems.


chattr command
  chattr command is used to hide permission settings file in the format of "chattr [parameters] files." If you want to add a feature to hide the files, append "+ parameters" in the command back, if you want to move files to a hidden feature, append "- parameter"
the chattr command is used to hide authority parameters and their effect

    chattr [parameters] file

          i can not modify the file; if this parameter is set to the directory, only the file modified sub-content which can not create or delete files
         a supplemental allow only (additional) content can not be overwritten / deleted content (the Append Only)
         S file content immediately after the change to the hard disk synchronization (sync)
         S completely deleted from the hard disk, unrecoverable (0 Zhi charge with the original hard disk where the file area)
         a no longer modify the last access time of the file or directory (atime)
         b no modification access time of the file or directory
         d check the compressed file in the wrong
         to ignore this file d use the dump command backup / directory
         c default compress a file or directory
         u still retains its data when the hard disk after deleting the file for future recovery
         t let the tail station and file system support (tail-Merging)
         the X-can directly access the contents of compressed files

 

 

lsattr command
  lsattr command is used to display the hidden file permissions, the format is "lsattr [parameters] files." In the Linux system, hidden file permissions must use the lsattr command to view, usually use the ls command like you do not see the clues.
Once the lsattr command, the hidden files are given permission soon visible. At this time you can be displayed according to the type of hide authority (alpha) using chattr command to remove.

 

Guess you like

Origin www.cnblogs.com/shrdbk/p/11609972.html