The chmod command lets you change the permissions of a file or directory in Learn Linux

To recursively change a directory and everything inside it, use the -R flag:

chmod -R u=rwx,g=,o= DIRECTORY

In the command above, u means “user” (aka “owner”), g means “group,” and o means “others.” The = means “set the permissions to the following,” and the rwx means “read, write and execute.” The g= and o= mean “set group and other permissions to nothing.” The uppercase -R means “recursively,” which means “do this to all of the contents of the directory as well.”