In a few previous posts, we learned how to change file and directory permissions with chmod. The standard method is to use numbers to represent various permissions. For example, typing “chmod 777 directoryname” will make the directory readable, writable, and executable for all users, local or otherwise.
There are many other codes to chmod for various permissions, but before we go into that, let’s learn some shortcuts. Rather than typing number that you might forget or accidentally give the wrong permissions, chmod also allows shortcuts. For example, if you wanted the group and others to be able to read and write a file, type:
chmod go=rx filename
To give read/write/execute permissions to all (i.e. 777), type:
You might find this easier the next time you need to change some permissions. We’ll cover more tips in the near future. Keep visiting this blog for updates.
Photo Source: Wikimedia Commons