IPFS file owner/peer id of node which published the file

i’m new to IFPS and i’m developing a private network with IPFS-Cluster.
I’ve just written a java function to delete a file from the network.
The problem is that i would like to give the permission to delete a file only to the node that have added it to the network. So to do this i need a way to get the peer-Id of the node that added it, is there any way to do this?