Results 1 to 13 of 13

Thread: custom ftp

  1. #1

    custom ftp

    could somebody tell me how i can set up a custom ftp server on the wl-700?

    i have tried to follow this guide:

    http://www.macsat.com/macsat/content/view/25/29/

    but how do i set up the xinetd? and how do i get the custom ftp started with the rc.local?

    would be nice if somebody could help me!

    thanks
    grat182

  2. #2
    If you only want to reconfigure the existing ftp server, you don't need to run xinetd. Just add these lines to rc.local:

    killall vsftpd
    /sbin/vsftpd /opt/etc/vsftpd.conf &

    You can copy /etc/vsftpd.conf to /opt/etc/vsftpd.conf and customize as necessary for your setup.

    - K.C.

  3. #3
    Thanks Kfurge, this is what i was looking for.

    Sollie.

  4. #4
    thanks kfurge thats it...

    but i have one question:

    the vsftpd now starts with the opt/etc/vsftpd.conf

    i have copied the original asus vsftpd.conf from etc to opt/etc and i have modified nothing.

    but when i start the vsftpd with the opt/etc/vsftpd.conf i get the following error when i connect to the router:

    [R] 220 Welcome to the WL700gE FTP service.
    [R] USER myusername
    [R] /dev/nvram: No such file or directory
    [R] 331 Please specify the password.
    [R] PASS (hidden)
    [R] /dev/nvram: No such file or directory
    [R] /dev/nvram: No such file or directory
    [R] 230 Login successful.
    [R] SYST
    [R] 215 UNIX Type: L8
    [R] FEAT
    [R] 211-Features:
    [R] EPRT
    [R] EPSV
    [R] MDTM
    [R] ICNV
    [R] PASV
    [R] REST STREAM
    [R] SIZE
    [R] TVFS
    [R] 211 End
    [R] PWD
    [R] 257 "/"
    [R] TYPE A
    [R] 200 Switching to ASCII mode.
    [R] PASV
    [R] 227 Entering Passive Mode (192,168,1,1,133,31)
    [R] Opening data connection IP: 192.168.1.1 PORT: 34079
    [R] LIST -al
    [R] 150 Here comes the directory listing.
    [R] 226 Transfer done (but failed to open directory).
    [R] List Complete: 0 bytes in 0,05 seconds (0,0 KB/s)

    does somembody knows a solution?

    thanks
    grat182

  5. #5
    The error messages you're seeing are very interesting. A little investigation revealed that Asus has messed a little bit with the base vsftpd source code. They added code to check to see if the router is ubsa mode in a number of places by querying the nvram. For some reason the queries don't seem to be working for you.

    I tested a little bit further on my box and vsftpd works OK for me when started as root from the command line as shown.

    A few questions come to mind:

    Are you starting it as root? If you're starting if from rc.local can you try just starting it from a command line instead and see if it works better?

    Finally, it's wierd that it can't find /dev/nvram. Are you running it in a chrooted environment?

    - K.C.

  6. #6
    thanks for help kfurge.

    its started as root... (manually started) but its the same whith the rc.local

    631 root 688 S /sbin/vsftpd /opt/etc/vsftpd.conf

    what do you mean with that?
    Are you starting it as root? If you're starting if from rc.local can you try just starting it from a command line instead and see if it works better?
    i have only added the two things in the rc.local

    killall vsftpd
    /sbin/vsftpd /opt/etc/vsftpd.conf &

    i think i have a chrooted enivornment.

    2 weeks ago i have changed the permissions in the opt/home/username dir to chmod 755. because dropbear won't worked anymore. (and i hadn't changed the permissions earlier!) now dropbear works but i don't know if i made something wrong....

    grat182

  7. #7
    Do this for pasv-mode support (WAN):

    Step1: Copy vsftpf conf
    "cp /etc/vsftpd.conf /opt/etc"

    Step 2: add pasv-mode support to vsftpd.conf
    "nano /opt/etc/vsftpd.conf"

    Add the following lines to the end of this file:
    pasv_enable=YES
    pasv_min_port=65000
    pasv_max_port=65535
    pasv_address=85.145.44.81
    (WAN-ip)

    Step 3: (re)start vsftpd with the new vsftpd.conf file at boot. Add the following lines to your rc.local file:
    #Enable pasv-mode for vsftpd
    killall vsftpd
    /sbin/vsftpd /opt/etc/vsftpd.conf &

    Thats all.

    Sollie.

    PS: the WAN-ip setting in vsftp.conf breaks pasv-mode support for local users.

  8. #8
    Quote Originally Posted by gratitude182 View Post

    what do you mean with that?

    ....

    i think i have a chrooted enivornment.

    ...

    2 weeks ago i have changed the permissions in the opt/home/username ... but i don't know if i made something wrong....

    grat182
    There are subtle differences between starting a program via rc.local and a login shell. The primary difference is the PATH and LD_LIBRARY_PATH environment settings. If the problem disappears when starting from a login command prompt, then you've probably got a problem with one of them.

    Regarding the chroot environment, if you haven't gone out of your way to enable it, then you're not running in such an environment. The reason why I asked is because /dev will disappear in a chrooted environment which could explain why the ftpd couldn't find /dev/nvram.

    I doubt the permission change to /opt/home/username is in any way related to your problem.

    - K.C.

  9. #9
    hi kfurge,

    could this be the problem with the paths -->

    i have the following in the opt/home/username/.profile:

    PS1="[\w]$ "
    PATH=/opt/sbin:/opt/bin:/sbin:/bin:/usr/sbin
    LD_LIBRARY_PATH=/opt/lib:/shares/lib

    export PS1 PATH LD_LIBRARY_PATH
    export TERMINFO=/opt/share/terminfo
    export TERM=vt100

    and in the rc.local:

    export PATH=/opt/bin:/opt/sbin:${PATH}
    export LD_LIBRARY_PATH=/opt/lib:${LD_LIBRARY_PATH}
    ?

    thanks
    grat182

  10. #10
    i don't know why that is now aslike it is, but when i run "screen" i have following error:
    [/]$ screen
    /var/run/utmp: No such file or directory
    screen works alltough but i don't know why that is now.

    grat182

  11. #11
    now the trick works (because i deleted some things in the dev/ram)....

    but now when i try to connect from wan it won't work cause pasv mode problem (locally everything works right). when i disable the firewall it works also from wan.

    i have also tried this in the vsfptd.conf file:

    pasv_enable=YES
    pasv_min_port=65000
    pasv_max_port=65535
    pasv_address=85.145.44.81

    but no luck.
    do i have to made some iptables? if yes, could somebody help me how they should look like?

    thanks
    grat182

  12. #12
    No,you have to use your own IP adress.

    Sollie.

  13. #13
    Quote Originally Posted by sollie View Post
    No,you have to use your own IP adress.

    Sollie.
    What if you have dynamic IP adress? Can you use the DNS name instead?

Similar Threads

  1. mount HDD without FTP?
    By reuzel in forum WL-500g Q&A
    Replies: 5
    Last Post: 17-01-2007, 09:08
  2. FTP in PBSA Mode - Possible??
    By Musk in forum WL-700g Q&A
    Replies: 2
    Last Post: 30-08-2006, 17:13
  3. Custom Firmware v1.1.2.7
    By JOCKYW2001 in forum WL-HDD Firmware Releases
    Replies: 59
    Last Post: 11-12-2004, 13:26
  4. How to get FTP workig on my WL500G
    By Driek in forum WL-500g Q&A
    Replies: 5
    Last Post: 20-10-2004, 21:03

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •