4 chown and chmod

The two commands that affect file/directory ownership and permissions are chown (for change ownership) and chmod (for change file mode bits).

To learn how to use these commands, you can refer to their manual pages. Use the following commands to learn more:

man chown  
man chmod  
  

Note that these commands are accessible to non-root users. As a result, every user can change file and folder permissions, as long as the rules are followed.

chown can be a one-way ticket. If user1 changes the ownership of a file to user2, then user1 is no longer the owner. As a result, user1 will no longer be able to change the ownership back to user1.

 4.1 chmod permission specifications
 4.2 Special flags
  4.2.1 The sticky bit
  4.2.2 The set-uid and set-gid bit