Please check the manual page chmod(2).