Monday, August 5, 2013

How to set chmod for a folder and all of its subfolders and files in Linux Ubuntu Terminal?

to change all the directories to 755:
    find /opt/lampp/htdocs -type d -exec chmod 755 {} \;
to change all the files to 644:
    find /opt/lampp/htdocs -type f -exec chmod 644 {} \;