Besides the usual rwx flags, there are some other interesting and useful flags.
The sticky bit has a letter code of t. To a directory, however, this bit is known as the “restricted deletion flag”. It works in conjunction with the w flag so that a non-owner user cannot remove or rename files (otherwise permitted by the w flag).
The set-uid (set user ID) and set-gid (set group ID) s flag are useful for several purposes. When applied to a file, it changes the privileges to that of the user owner or group owner when the file executes. When the s flag applies to the user-owner portion, then the file always executes with the same privileges of the user owner. When the s flag applies to the group-owner portion, then the file always executes with the same privileges of the group owner.
Use this bit with care when applied to files, as it can lead to security risks!
When the s flag is applied to a directory, it means that all files and subdirectories will be created inheriting the group ownership of the parent directory.