There are three Advanced Permissions
1) Set User ID (SUID)
2) Set Group ID (SGID)
3) Sticky bit
#chmod u+s filename
SGID has two effects
1) If SGID is applied on file- user can run file as group owner of the filr
2) If SGID is applied on directory- all files in that directory will be owned automatically by group owner of that specified directory afterwards.
#chmod g-s <file or directory>
#chomd g-s demo234
Sticky bit is used to protect files against accidentally deletion in multi user environment. If we apply this Advanced permission to directory then only owner can delete files from that directory. Like /tmp
t - indicates sticky bit + execute permissions
T - indicates only sticky bit is applied