The format obtained by using the ls command for linux permission setting is similar to-rwxr-xr-x. The meaning of the format is parsed below. This representation has a total of ten digits: 9 8 7 6 5 4 3 2 1 0-r w x r-x 9th bits to indicate the file type, it can be p, d, l, s, c, B, and -: p indicates the named pipeline file d indicates the directory file l indicates the symbolic connection file-indicates the common file s indicates the socket file c indicates the character device file B indicates the 8-6 bits, 5-3 bits, and 2-0 bits of the block Device File bits indicate the permissions of the file owner, permissions of users in the same group. permissions of other users are in the form of rwx. In linux, using chmod (change file modebit) to change the permissions of a file can be either of the following methods: 1. the chmod [ugoa] [+-=] [rwx] filename method is intuitive, u represents the owner (user), g Represents the group, o Represents other users (other), and a represents all users (all ). +-= Indicates adding, removing, and setting the corresponding permissions. Rwx represents read, write, and exe respectively ). For example, chmod a + x filname indicates that the execution permission on filename is added to all users. 2. setUid and setGid if SUID is set for a command, the user who executes the command has the permission of the owner of the command during execution; if an SGID is set for a command, the user who executes the command has the Group permission for the command during execution. set SetUid permission: chmod 4xxx filename cancel SetUid permission: chmod xxx filename set SetGid permission: chmod 2xxx filename cancel SetGid permission: if you run the "chmod 6xxx filename" command, you can set SetUid and SetGid for the specified file and run the command "chmod 0xxx filename" to cancel the SetUid and SetGid permissions for the specified file.