Not able to override the file in server

Aug 26, 2011 at 1:36 PM



I am not able to override the file.. i am getting exception "Access denied"

is it possible to override the file in hositng server?





Aug 26, 2011 at 1:53 PM



I am passing those overide attributes to the server and wheter it usses it or not I cannot control.

One way to do it is:

var stream = sftp.Open(path, FileMode.Create);

In this case what should happen is if file already exists it will truncate it and if not it will create a new one.

Also, when you do Upload, it should override existing file since I am using those attributes to open file for upload:

Flags.Write | Flags.CreateNewOrOpen | Flags.Truncate

I guess my only guess in this case, if you getting a problem, system simply cannot override it for some other reason, security for example, or may be not supporting those attributes.

Try it on a different server(s) and/or different file and see if you still have the same problem.


Hope it helps,