Results 1 to 4 of 4

Thread: stupid-ftp and filesystem on HDD

  1. #1
    Join Date
    Jan 2005
    Location
    Czech Republic
    Posts
    4

    stupid-ftp and filesystem on HDD

    The troubles with stupid-ftp

    I have ASUS wl-500b with the firmware v.1.9.2.7 CR3b from Oleg. I have following problems with th FTP server that is the part of the firmware:

    1) while uploading file, it is saved with reset attributes and with "root" as the file owner, so the access to this file is denied for www server.
    ---------- 1 root root 758 Jan 18 00:01 test.html

    2) In case I set the owner and the attributes for this file (666) and try to update it, the following happens: If the updated file is shorter then the original file, FTP server does not adjust the file size but just overwrites old file by new data, so the lenght of the file stays the same and there is still the rest of old data after the
    new one. If new file is longer, there is no problem.

    Is it possible that these two problems are caused by file system incompatibility? (The file system containing the FTP directory is formated as "ext3" instead of "FAT".)

    3) The original "stupid-ftpd.conf" file got lost after the conversion of filesystem on my HDD and it can not be found. Was it been created dynamicaly? The command "find / -name stupid-ftpd.*" only finds the FTPD server. But I can still add and delete the users, set up bann to IP addresses etc. And these changes will stay stored on www pages even after router restart. But their influence to FTP server is none.
    By the way, I found the way how to cheat it: I created the file stupid-ftp.conf in different directory (/usr/etc/) and I run the FTP server from script /usr/local/sbin/post-boot by the command /usr/sbin/stupid-ftpd -f /usr/etc/stupid-ftpd.conf.

    4) If I login o the router using Telnet or SSH, FTP keep listing weird reports to console, such as "Unknown command: 'FEAT'" etc. (It looks like it is not only error messages.) Even adding "&>/dev/null" to the command I use to start the FTP daemon would not work.

    Thank you for any advice or help!

    My configuration:
    --------------------------
    ASUS wl-500b, firmware v.1.9.2.7 CR3b from Oleg, web server thttpd s PHP4

    Filesystem is placed on HDD, HDD is divided into following partitions:
    /dev/scsi/host0/bus0/target0/lun0/part1 * 1 497 2003872+ 83 Linux
    /dev/scsi/host0/bus0/target0/lun0/part2 498 514 68544 82 Linux swap
    /dev/scsi/host0/bus0/target0/lun0/part3 515 788 1104768 83 Linux

    Partition 1 a partition 3 are formated as ext3 and mounted:
    /dev/scsi/host0/bus0/target0/lun0/part1 on / type ext3 (rw)
    /dev/scsi/host0/bus0/target0/lun0/part3 on /tmp/harddisk type ext3 (rw)

    symbolic link ftp -> /tmp/harddisk does exist

    Konfiguration file for stupid-ftpd looks like this:
    mode=daemon
    serverroot=/ftp
    changeroottype=real
    banmsg=You have no permission
    log=/tmp/stupid-ftpd.log
    port=21
    maxusers=12
    login-timeout=120
    timeout=240
    user=admin admin // 0 A
    user=userpub passpub /ftp_pub/ 2 A
    user=web passweb /ftp_pvt/web/ 2 A

  2. #2
    Join Date
    Dec 2003
    Location
    Russian Federation
    Posts
    8,356
    Vladimir, I will check on this shortly. Just need some time for other things.

  3. #3
    Join Date
    Nov 2003
    Location
    Eindhoven
    Posts
    2,407
    Quote Originally Posted by vladimir
    The troubles with stupid-ftp

    I have ASUS wl-500b with the firmware v.1.9.2.7 CR3b from Oleg. I have following problems with th FTP server that is the part of the firmware:

    1) while uploading file, it is saved with reset attributes and with "root" as the file owner, so the access to this file is denied for www server.
    ---------- 1 root root 758 Jan 18 00:01 test.html

    2) In case I set the owner and the attributes for this file (666) and try to update it, the following happens: If the updated file is shorter then the original file, FTP server does not adjust the file size but just overwrites old file by new data, so the lenght of the file stays the same and there is still the rest of old data after the
    new one. If new file is longer, there is no problem.

    Is it possible that these two problems are caused by file system incompatibility? (The file system containing the FTP directory is formated as "ext3" instead of "FAT".)
    regarding case 2 I've also seen this happening with fat32 & stupid-ftpd

    My little Asus Collection: Too much to fit inhere, my 2 babies:WL500w 1.9.2.7-10(OLEG) VX2SE Yellow Lamborghini notebook



    WL500g Forum Asus Files OpenDir

    Asusforum.NL -- Asusforum.DE -- Asusforum.RU -- Asusforum.PL -- Asusforum.NET -- Asusforum.EU -- Asusforum.BE -- Asusforum.ES -- Asusforum.INFO

  4. #4
    Join Date
    Dec 2003
    Location
    Russian Federation
    Posts
    8,356
    Quote Originally Posted by Vladimir
    1) while uploading file, it is saved with reset attributes and with "root" as the file owner, so the access to this file is denied for www server.
    ---------- 1 root root 758 Jan 18 00:01 test.html
    Yes, this is a bug. Fixed.
    2) In case I set the owner and the attributes for this file (666) and try to update it, the following happens: If the updated file is shorter then the original file, FTP server does not adjust the file size but just overwrites old file by new data, so the lenght of the file stays the same and there is still the rest of old data after the
    new one. If new file is longer, there is no problem.
    Bug, the in the same line as above, added truncation.
    Is it possible that these two problems are caused by file system incompatibility? (The file system containing the FTP directory is formated as "ext3" instead of "FAT".)
    Truncation thing should happen with FAT also, attributes - have not checked this yet.

    3) The original "stupid-ftpd.conf" file got lost after the conversion of filesystem on my HDD and it can not be found. Was it been created dynamicaly? The command "find / -name stupid-ftpd.*" only finds the FTPD server. But I can still add and delete the users, set up bann to IP addresses etc. And these changes will stay stored on www pages even after router restart. But their influence to FTP server is none.
    By the way, I found the way how to cheat it: I created the file stupid-ftp.conf in different directory (/usr/etc/) and I run the FTP server from script /usr/local/sbin/post-boot by the command /usr/sbin/stupid-ftpd -f /usr/etc/stupid-ftpd.conf.
    stupid-ftpd.conf is generated by the router on the fly, but for this this will not work if use rootfs (due to missing hotplug events). So, you need to create them manually or add this line to post-boot script:
    Code:
    nvram set usb_storage_device=1
    4) If I login o the router using Telnet or SSH, FTP keep listing weird reports to console, such as "Unknown command: 'FEAT'" etc. (It looks like it is not only error messages.) Even adding "&>/dev/null" to the command I use to start the FTP daemon would not work.
    This only happens if you start it manually.
    start it like this:
    Code:
    stupid-ftpd > /dev/null 2>&1
    Check your PM.

Similar Threads

  1. Is it possible to get contents of root filesystem on sl500?
    By vl409 in forum SL-1000 Firmware Discussion
    Replies: 4
    Last Post: 05-10-2005, 14:07
  2. stupid-ftp 2GB limit?
    By spank_santa in forum WL-HDD Custom Development
    Replies: 1
    Last Post: 08-09-2005, 10:31
  3. Replies: 4
    Last Post: 16-08-2005, 21:58
  4. stupid man
    By modnet25 in forum WL-500g Q&A
    Replies: 4
    Last Post: 28-02-2005, 00:02
  5. filesystem on usb disk??
    By NIGHTCD in forum WL-500g Q&A
    Replies: 7
    Last Post: 15-09-2004, 12:23

Posting Permissions

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