-->
Page 1 of 1

How to change directory on a remote machine using a wifi FTP

PostPosted: Mon Oct 09, 2017 11:17 pm
by katesfb
Hi,
I am trying to do an FTP file upload using an example i found here:https://github.com/fryguy128/esp8266FTP/blob/master/FTPESP8266.ino. When i use this i can log in to our server however when the file is uploaded i get a "permission denied" error. This is because i do not have permissions to access the root directory on the remote server however i do have permissions to access a subdirectory on the remote server. i have tried to access this subdirectory by using the client.println() method e.g>

Code: Select allif(!eRcv()) return 0;

  client.print("CD ");
  client.println("/"subdirectory"/"allowed directory");


However this does not work. i get the server response "command not understood".

What is the correct way of changing the working directory on the remote machine and where should it be placed in the code?

Any help is much appreciated.

Cheers.

Re: How to change directory on a remote machine using a wifi

PostPosted: Thu Oct 12, 2017 5:38 am
by gdsports
Try client.println("CWD /mydirectory");

If this does not work, I suggest google for "FTP RFC".