Access denied when put files from fileshare
Hi,
I am using the WinScp lib and trying to transfer a file from a fileshare to a SFTP server:
session.PutFiles(@"\\myserver.com\share\myfile.txt", "/uploads/folder/myfile.txt", false, transferOptions);
When using a fileshare \\myserver.com\share I get the following:
WinSCP.SessionRemoteException: File or folder '\\myserver.com\share\myfile.txt' does not exist.
System Error. Code: 5.
Access is denied
at WinSCP.OperationResultBase.Check()
at FileShareAccessTest.Program.Main(String[] args)
I have checked the user permissions for the fileshare and folder and it is full rights.
I can list files and folders on that file share with Directory.GetFiles().
It also works with another fileshares.
Could it be an firewall issue on the fileshare server \\myserver.com?
Do I need to open specific ports on the fileshare server for "session.PutFiles"?
Or what can I do to get more information?
Best regards,
/Jörgen
I am using the WinScp lib and trying to transfer a file from a fileshare to a SFTP server:
session.PutFiles(@"\\myserver.com\share\myfile.txt", "/uploads/folder/myfile.txt", false, transferOptions);
When using a fileshare \\myserver.com\share I get the following:
WinSCP.SessionRemoteException: File or folder '\\myserver.com\share\myfile.txt' does not exist.
System Error. Code: 5.
Access is denied
at WinSCP.OperationResultBase.Check()
at FileShareAccessTest.Program.Main(String[] args)
I have checked the user permissions for the fileshare and folder and it is full rights.
I can list files and folders on that file share with Directory.GetFiles().
It also works with another fileshares.
Could it be an firewall issue on the fileshare server \\myserver.com?
Do I need to open specific ports on the fileshare server for "session.PutFiles"?
Or what can I do to get more information?
Best regards,
/Jörgen