change permissions of all Folders and Subfolders (also works for files)

change permissions of all Folders and Subfolders (also works for files)

To set the permissions of all files and subfiles, or folders and subfolders run the following:

Folders: find . -type d -exec chmod 0755 {} \;
 - Finds all units that are folders and changes permissions to 755

Files: find . -type f -exec chmod 0644 {} \;
 - Finds all units that are files and changes permissions to 644

To set files/folders to different permission values, change the integer after chmod to the value of choice.
    • Related Articles

    • Chmod or change permissions on a directory through FTP client (FileZilla)

      Every file and folder that exists on your web server has a set of attributions, or permissions, that you can change using FileZilla. These permissions are assigned and tells the web server three things about the folder or file. On a very simplistic ...
    • Joomla/WordPress/CMS Permissions

      With the way that Hsphere and cPanel work in our shared environments, all CMS permissions should be set as follows: Directories - 755 Files - 644 If permissions have been changed or if you're unsure which permissions are which, you can run the ...
    • File Manager Cpanel / Fixing 403 correcting permissions.

      Learn how to troubleshoot WordPress 403 Forbidden error messages. We show you how to check for a corrupt .htaccess file. Diagnose faulty WordPress Plugins and checking for correct WordPress file permissions. Problem When you attempt to view your ...
    • How To Sync IMAP Folders on iPhone

      How to subscribe to folders If you set up the IMAP mail account on your iPhone, you may not  find the IMAP folders in your Inbox folder. If this is the case, you'll need to specify the IMAP path prefix. You can enter in the IMAP path prefix by going ...
    • MYSQL basic user permissions

       Grant Different User Permissions On a MYSQL database. Here is a short list of other common possible permissions that users can enjoy. ALL PRIVILEGES- as we saw previously, this would allow a MySQL user all access to a designated database (or if no ...