how to decide that guys. When used share add function for doctype i got permission denied error.

frappe.share.add(

            "Saving", saving.name,

user=user,

read=1,

write=1

        )

File “apps/frappe/frappe/_init_.py”, line 525, in _raise_exception
raise exc
exc = PermissionError(‘No permission to share Saving 280v5o7t90’)
inspect = <module ‘inspect’ from ‘/usr/lib/python3.10/inspect.py’>
msg = ‘No permission to share Saving 280v5o7t90’
out = {‘message’: ‘No permission to share Saving 280v5o7t90’, ‘title’: ‘Message’, ‘indicator’: ‘red’, ‘raise_exception’: 1, ‘__frappe_exc_id’: ‘bf670cc61d8db0997effbb21afb0efadec1857e7f762a9c17682b772’}
raise_exception = <class ‘frappe.exceptions.PermissionError’>
frappe.exceptions.PermissionError: No permission to share Saving 280v5o7t90

Can you add a proper title and enough details to help understand the issue? It will be helpful for resolving it faster. Also, please add the version and steps to reproduce the issue.