PDA

Bekijk de volledige versie : Help with NcFTP



dare023
10-10-2011, 19:55
I am trying to use ncftp on my asus wl 500 gpv2 router,as i need to upload many files with ftp,and I will like to do it while I am not at home.
Ncftp is installed,and if
put /local_file is issued there is no problems.
But when I do a bgput /local file (I understand this is command for background job) got this message :

"Sorry, the "ncftpbatch" program could not be found.
This program must be installed as opt/bin/ncftpbatch in order to use this feature."
Same error is shown with
bgstart
Ncftpbatch is installed,as
ncftpbatch -d gives no error.
This shows that it is on wright place :

ipkg files ncftp
Package ncftp (3.2.4-1) is installed on /opt/ and has the following files:
/opt/man/man1/ncftpput.1
/opt/man/man1/ncftpget.1
/opt/bin/ncftpput
/opt/man/man1/ncftpspooler.1
/opt/bin/ncftpspooler
/opt/man/man1/ncftp.1
/opt/bin/ncftpbatch
/opt/bin/ncftpls
/opt/bin/ncftpget
/opt/man/man1/ncftpls.1
/opt/bin/ncftpbookmarks
/opt/bin/ncftp
/opt/man/man1/ncftpbatch.1
And /opt/bin is my PATH :

echo $PATH
/opt/sbin:/opt/bin:/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin

Can you tell me how to use this background feature,as I need to transfer files while I am at work,and they are allready on storage that is attached to router?(I transfered test files from that storage to ftp site)
And more,bookmarks are not stored,if router reboots all configuration files are wiped.

dare023
11-10-2011, 20:57
I have found howto fix settiings part :

export NCFTPDIR/tmp/some_directory
Problem is that this must be done after each restart?
How to make this permanent?
Still got no success with ncftpbatch.There is PATH variable for ncftp but

export PATH=/opt/bin
does nothing.

dare023
13-10-2011, 18:58
This is a one way to deal with this:
add to /opt/etc/profile

export NCFTPDIR=/tmp/harddisk/ncftp
this way all settings and jobs are saved if router is restarted.
As for creating jobs,cannot get "bgput" but this works perfect

ncftpput -bb -u user -p pass ftp.somehost.com /upload_directory /tmp/harddisk/some_files
This command creates jobs in ncftp/spool diresctory,and they can be listed with

ncftpbatch -l and started with
ncftpbatch -d
(creates process that will work untill all jobs are finished)
Hope somebody will find this useful.