Page 1 of 1

Synchronization Error while sync data on FTP

Posted: May 2nd, 2019, 6:00 am
by bhavesh.makwana
hi Josh,

i have used syncconnect function for syncing data in FTP in specific folder, and its running successfully on my desktop machine but when i used this prog on android device am getting error "Error connecting to sync server: it.sauronsoftware.ftp4j.FTPException: Access is denied."

Can you please guide me..

Thanks & Regards,
Bhavesh

Re: Synchronization Error while sync data on FTP

Posted: May 2nd, 2019, 11:27 am
by Gregory Martin
Are you using the same login credentials on both machines? See here for how to clear the credentials on Android:

http://www.csprousers.org/forum/viewtop ... 2105#p6865

Then try the sync again and see what happens.

Re: Synchronization Error while sync data on FTP

Posted: May 3rd, 2019, 3:04 am
by bhavesh.makwana
HI, Josh,

As per your suggestion i have done this steps on android & desktop machine still am getting same error, Actually my problem that i want to put data on ftp in specific folder please see my logic are below mentioned.

if syncconnect(ftp, "ftp://x1.x2.x3.x4//BHM", "CAPI","Passwrod123") = 1 then

this logic working fine with desktop machine but when am using android device am getting error "Error connecting to sync server: it.sauronsoftware.ftp4j.FTPException: Access is denied." (please refer attached screen shot of CAPI device)

but when am update my logic as per below mentioned prog putting data on root of FTP

if syncconnect(ftp, "ftp://x1.x2.x3.x4/", "CAPI","Passwrod123") = 1 then

kindly suggest to how to put data on my desired folder.


Thanks in Advance,
Bhavesh

Re: Synchronization Error while sync data on FTP

Posted: May 3rd, 2019, 12:49 pm
by josh
Do not use the folder name in the call to syncconnect. Instead include the folder name as the destination path in the call(s) to syncfile e.g. syncfile(PUT, "foo", "/BHM/foo")

Alternatively configure your FTP server to make the home folder for the user be the BHM folder rather than the root.

Re: Synchronization Error while sync data on FTP

Posted: May 4th, 2019, 2:01 am
by bhavesh.makwana
josh wrote:Do not use the folder name in the call to syncconnect. Instead include the folder name as the destination path in the call(s) to syncfile e.g. syncfile(PUT, "foo", "/BHM/foo")

Alternatively configure your FTP server to make the home folder for the user be the BHM folder rather than the root.
Hi Josh,

Its seems that CSPro by default put data in ftp root.

Thanks & Regards,
Bhavesh

Re: Synchronization Error while sync data on FTP

Posted: May 4th, 2019, 12:01 pm
by josh
When syncing data files using either the sync options dialog or the logic function syncdata() the data is placed in the directory CSPro\DataSync off the home directory of the FTP user. The only way to change this is to modify the home directory of the FTP user. How you do this depends on your FTP server and operating system.

When syncing files (pen file, photos...) using the function syncfile you can control which directory the files are written by specifying the directory in the call to syncfile e.g. syncfile(PUT, "foo", "/BHM/foo").