chmod

Very useful to change file permissions, do chmod +x <name_of_file>

  • chmod +rwx filename to add permissions.
  • chmod -rwx directoryname to remove permissions.
  • chmod +x filename to allow executable permissions.
  • chmod -wx filename to take out write and executable permissions.

chmod 666 vs chmod 777?

A text file has 666 permissions, which grants read and write permission to everyone. A directory and an executable file have 777 permissions. Source: https://docs.oracle.com/cd/E19253-01/816-4557/secfile-60/index.html