How to change all file permissions to 644 and all folder permissions to 755 recursively using chmod in the following two situation:
If they had 777
permissions
find . -type d -perm 777
-exec chmod 755 {} \; (for changing the directory permission)
find . -type f -perm 777
-exec chmod 644 {} \; (for changing the file permission)
If they did not have 777
permissions, we easily remove the -perm 777 part.
look like that
find . -type d -exec
chmod 755 {} \; (for changing the directory permission)
find . -type f -exec
chmod 644 {} \; (for changing the file permission)
No comments:
Post a Comment