Igor Simic
8 years ago

How to change folder permission in terminal


How to set folder permission and all subfolders in Mac terminal? You can try with these commands:
 
change chmod all files and directories within the current directory
find  . -print -exec chmod 777 {} \;


To change all the directories to 755 (-rwxr-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 {} \;

To change only the folder permission

chmod -R <permissionsettings> <dirname>