To find and change founded file or directory permission I use beloved command
1 2 |
find . -type d -exec chmod 755 {} \; find . -type f -exec chmod 644 {} \; |
“find” : find command
“.” : directory and “.” is current directory
“-type” : type the file that we want to search is “d” is directory and “f” is file
“-exec” : executing next commend
“chmod”: command for change permission
“755 or 644 ” : permission of file or folder