Recursively change permissions (chmod) on either files or folders in Linux

Recursively give all folders public read & execute (755) privileges:
find /path/to/base/dir -type d -exec chmod 755 {} +

Recursively give all files public read privileges (644) privileges:
find /path/to/base/dir -type f -exec chmod 644 {} +

Leave a Reply

Your email address will not be published. Required fields are marked *