Synchronization Error while sync data on FTP

Discussions about syncing data via Bluetooth, Dropbox, FTP, and using CSWeb
Forum rules
New release: CSPro 8.0
Post Reply
bhavesh.makwana
Posts: 6
Joined: May 2nd, 2019, 5:54 am

Synchronization Error while sync data on FTP

Post 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
Gregory Martin
Posts: 1777
Joined: December 5th, 2011, 11:27 pm
Location: Washington, DC

Re: Synchronization Error while sync data on FTP

Post 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.
bhavesh.makwana
Posts: 6
Joined: May 2nd, 2019, 5:54 am

Re: Synchronization Error while sync data on FTP

Post 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
Attachments
CAPI_Device_Error.jpg
CAPI_Device_Error.jpg (187.2 KiB) Viewed 3704 times
josh
Posts: 2399
Joined: May 5th, 2014, 12:49 pm
Location: Washington DC

Re: Synchronization Error while sync data on FTP

Post 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.
bhavesh.makwana
Posts: 6
Joined: May 2nd, 2019, 5:54 am

Re: Synchronization Error while sync data on FTP

Post 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
josh
Posts: 2399
Joined: May 5th, 2014, 12:49 pm
Location: Washington DC

Re: Synchronization Error while sync data on FTP

Post 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").
Post Reply