Content access based on the content author's role I have a content type named "Files". I have given access for users with roles editor 1, editor 2 and editor 3 to update and delete their own content.

Now If a user with editor 1 creates a files content. I need to allow other users with same role (editor 1) to update and delete the content.

I tried Content Access Module but it doesn't helps.

Can anyone give me a working example for this scenario.
The permission on "own content" is connected to the node's author's uid and only relates to role in that a user with the role holding that permission can edit a node they created.

How I would solve your use case is with a hook_node_access in a custom module.
https://api.drupal.org/api/drupal/modules!node!node.api.php/function/hook_node_access/7
WARNING: I just threw this together as an example, I did not test, and you need to put in the right role values.

hook_node_access($node, $op, $account) {
  if( $op !== 'update'){
    // not my use-case
    return NODE_ACCESS_IGNORE;
  }

  $author = user_load($node-&gt;uid);
  if( in_array( 'role1', $author-&gt;roles) &amp;&amp; in_array( 'role1', $account-&gt;roles) ) {
    // the user editing has the same role as the author
    return NODE_ACCESS_ALLOW;
  }
  // repeat ... etc.

  // we did not find what we were looking for, continue with normal access check
  return NODE_ACCESS_IGNORE;
}