Permission Denied on CreateFolder

Advertisement

silas2
Joined:
Posts:
2

Permission Denied on CreateFolder

I can't understand, I've been using ftp and creating folders no problem, now I'm getting permissions denied with a new sftp connection. I'm using SshHostKeyFingerprint="ssh-rsa xxxx" to connect the session.
If I run session.ListDirectory("public_html") and I get list of folders + upload single files, but I get a permissions exception when I run session.CreateDirectory("\\public_html\\app\\code")
BUT If I use the WinSCP UI with the same connection credentials I can make a folder ….?
My WinScpNet version is 1.3.7.7601.

Reply with quote

Advertisement

martin
Site Admin
martin avatar
Joined:
Posts:
40,476
Location:
Prague, Czechia

Re: Permission Denied on CreateFolder

"public_html" and "\\public_html" are different paths.
Use a full path as you can see in GUI.
Also you should not use CreateDirectory to create multiple levels of folders in one call.

Reply with quote

Advertisement

You can post new topics in this forum