Linux. Recursively Change Directory Permission
This Linux snippet shows how to recursively change read, write and execute permissions for a directory and its files.
To change the directory permission recursively the chmod command must be used with the -R attribute. However, before being able to execute the command the user must be authenticated as superuser.
chmod -R 777 /dirpath