On SharePoint server, I am trying to copy a file with Shared drive's folder through C# code. But its not get working shows in the logs 'Access denied'. The user credentials I used in code has Read/write/Read & Execute/Modify permission. If I apply the Authenticated User permission it get work. Also, I don't want to apply the Everyone, Network, Authenticated User permission on the folder.
Can anyone please advise which SharePoint server account permission I have to use in the code and which permission I have to add on the folder so that file gets copy.