chmod for directory code example
Example 1: how to make all directory 775
find /opt/lampp/htdocs -type d -exec chmod 755 {} \;
find /opt/lampp/htdocs -type f -exec chmod 644 {} \;
Example 2: change the permissions of a folder in linux
sudo chmod -R 757 <file>
Example 3: how to set execute permission in linux
chmod +x script-name-here.sh #Change the "script-name-here" to the name of your .sh file.