Linux: Changing Permissions On All Files and Folders Within a Directory

Change All Permissions on File and Folders

Eventually, you may install a script that has a directory with multiple folders and files. Unfortunately, the files and folders had been installed with inadequate permissions. For example, you may want to set the permissions for all folders to 755 and the permissions for all files to 644. The code code below will demonstrate two simple Linux command line statements that can do this.

 root# find /home/user/public_html/mycrm/cache -type d | xargs chmod -v 755 root# find /home/user/public_html/mycrmr/cache -type f | xargs chmod -v 644