You can do this with two command calls find, with a parameter -userfor filtering by user and an option -typefor filtering by file type:
find . -user "$USER" -type d -exec echo chmod 770 {} +
find . -user "$USER" -not -type d -exec echo chmod 660 {} +
Delete echoafter testing to really change permissions.
source
share