I am trying to give permission(Same what Account object has) on my custom object which is master detail with Account object. But getting Field integrity exception.
System.DmlException: Insert failed. First exception on row 0; first error: FIELD_INTEGRITY_EXCEPTION, Permission Create CustomeObj__c depends on permission(s): Read Account:  current user has Read Write permission on Account object.
Previously i was assuming that if a object has Master Detail relation then automatically master object permission will assign to new object but it is not happening.
Any idea how to overcome this error.