How do I set permissions on all directories and files on a Linux system?

To change all the directories to 755 (drwxr-xr-x):

find /opt/lampp/htdocs -type d -exec chmod 755 {} \;

To change all the files to 644 (-rw-r--r--):

find /opt/lampp/htdocs -type f -exec chmod 644 {} \;

Revision #1
Created 2024-03-27 05:34:06 UTC by Admin
Updated 2024-03-27 05:44:29 UTC by Admin