First, the file default permissions: Umask <== need to be subtracted from the permissions.
1, umask refers to the current user in the new file or directory when the default permissions, such as 0022;
2, by default, the user creates a file with a maximum permission of 666; The maximum permission to create a directory is 777.
3, the ultimate permission = Maximum permission-umask; <== Note here is not a direct numeric subtraction.
4, set Umask:umask 002;
5, by the above conditions, you judge the user to create a new file or directory of the final permissions.
Second, the hidden properties of the file: Chattr, Lsattr, hidden properties for the system security has a great help.
chattr [+-=] [asacdistu] file or directory name;
lsattr [-adr] file or directory.
1, can only be effective on EXT2/EXT3 file system.
2. Hidden properties can only be viewed through lsattr.
Third, the special permissions of the file: Suid\sgid\sbit (currently only understand)
1. The Set uid:s flag appears on the file owner's X-permission.
A, suid is only valid for binary programs.
B, the performer must have X's executable permission on the program.
C, this permission is only valid during the execution of the program (runtime).
D, the performer will have the permissions of the program owner.
2. The set Gid:s flag appears on the X permission of the file user group.
3. Sticky Bit:
chmod 4755 filename;
Iv. viewing file types: Gets the basic data for a file.
FILE/USR/BIN/PASSWD;