I need to set the same permissions of owner to group recursively to all elements in a directory.
Set group permissions as owner permissions
files;permissions;recursive
There's a fairly simple answer(although I don't know for sure whether it works on all versions of *nix);simply dochmod g=u *i.e., set the group permissions equal to the user permissions.This is documented in chmod(1):The format of a symbolic mode is [ugoa...][[+-=][perms...]...],  where perms is either zero or more letters from the set rwxXst,  or a single letter from the set ugo.  The letters rwxXst select .  Instead of one or more of these letters, you can specify exactly one of the letters ugo:  the permissions granted to the user who owns the file (u),  the permissions granted to other users  who are members of the files group (g), and the permissions granted  to users that are in neither of the two preceding categories (o).