To change the permissions on all directories or files in a certain path linux

First we have to use find command to look for either directories of files and then we use the exec command on our find.

To change the permissions on all directories in a certain path

$ sudo find /path/you/want/to/search -type d -exec chmod 775 {} +

To change the permissions on all files  in a certain path

$ sudo find /path/you/want/to/search -type f -exec chmod 775 {} +

To Know what the chmod 775 does go here