
Richard H. answered 01/24/20
Senior Linux Systems Engineer with Red Hat certification.
chmod supports recursiveness with param -R so just run chmod -R 755 /opt/lampp/htdocs and that will change the permissions for the existing folders. However, if you want to change the behavior of all future folders or files, you can use umask. If you specifically want to grant specific permissions for future files and folders under a specific path, then you want to use getfacl and setfacl as they're very granular and allow you to do inheritance.