Hi,
it would help if you gave a bit more information about what you are trying to achieve. There are many ways: scp, http, ftp, smtp, nfs, cifs etc.
However I'll take a guess that what you want is cifs, in which case you should look into samba:
https://www.samba.org/
If you want more details, you'll have to provide us with some of your own. Eg. What distro(s) you are running, exactly what you mean by "share a file", etc.
HTH,
Evo2.