Page 1 of 2 12 LastLast
Results 1 to 15 of 23

Thread: How do I get mget to work on mfs_ftp ?

  1. #1
    Join Date
    Feb 2007
    Posts
    72

    How do I get mget to work on mfs_ftp ?

    This shouldn't be difficult:


    ftp>
    ftp>
    ftp> cd ts
    250 Directory change successful.
    ftp>
    ftp> bin
    200 Type set to I
    ftp> prompt
    Interactive mode off.
    ftp> hash
    Hash mark printing on (1024 bytes/hash mark).
    ftp>
    ftp> mget *
    Command not implemented "EPSV"
    ftp>
    ftp>

    (and also disconnects me there)


    Ok, fine, I will toggle EPSV off:

    ftp>
    ftp>
    ftp> cd ts
    250 Directory change successful.
    ftp>
    ftp> epsv
    EPSV/EPRT on IPv4 off.
    ftp> bin
    200 Type set to I
    ftp> hash
    Hash mark printing on (1024 bytes/hash mark).
    ftp> prompt
    Interactive mode off.
    ftp>
    ftp>
    ftp> mget *
    ftp>


    and ... disconnected.

    Let's try one more time with a more specific mask:


    ftp>
    ftp>
    ftp> cd ts
    250 Directory change successful.
    ftp>
    ftp> epsv
    EPSV/EPRT on IPv4 off.
    ftp> bin
    200 Type set to I
    ftp> hash
    Hash mark printing on (1024 bytes/hash mark).
    ftp> prompt
    Interactive mode off.
    ftp>
    ftp> mget {*
    ftp>
    ftp>
    ftp>


    and ... disconnected again.

    So, how does ftp work in tivo-land ? Perhaps we should call it something besides ftp if it isn't going to function like actual ftp ?

  2. #2
    Join Date
    Dec 2004
    Posts
    831
    It works just fine, for me. Are you sure you have write permissions for the system from which you are starting the ftp session? Also, I presume you are starting the ftp session from a PC, or was this an attempt to mget files to the TiVo from elsewhere?
    Having trouble with TyTool? Try TyTool Documentation
    Need to hack an S3 / THD? Try S3 Hacking Script

  3. #3
    Join Date
    Feb 2007
    Posts
    72
    Yes, I am on a unix pc and I run command line ftp to log into the tivo.

    Once logged in over ftp to the tivo, I am attempting to "mget *".

    I do indeed have write permissions for the local destination and it is mounted read-write.

    I can successfully "get", so all is well structurally ... I just can't "mget".

  4. #4
    Join Date
    Aug 2004
    Posts
    4,085
    You might want to look at the server side log (port.3105.log) to see why you are getting disconnected. It could be the PASV bug, for example, if you aren't patched for it.

  5. #5
    Join Date
    Feb 2007
    Posts
    72
    jamie:

    If it is the "PASV bug" is there a workaround for it ?

  6. #6
    Join Date
    Feb 2007
    Posts
    72
    ok here are the logs - definitely an error of some kind:


    08:38:30:PM - 226 Transfer complete.
    08:38:40:PM - 227 Entering Passive Mode (192,168,0,11,12,32).
    08:38:40:PM - 150 Opening ASCII mode data connection for file list.
    08:38:42:PM - updating cached recording info
    .....................................................................

    .....................................................................

    bgerror invoked with error

    " couldn't compile regular expression pattern: quantifier operand invalid "

    errorInfo:
    couldn't compile regular expression pattern: quantifier operand invalid
    while executing
    "regexp -nocase $matchstr $info($fsid,rec_filename)"
    (procedure "NLST" line 19)
    invoked from within
    "NLST $line $fsock "
    ("NLST" arm line 1)
    invoked from within
    "switch $cmd {
    USER { USER $fsock $line }
    PASS { PASS $fsock $line }
    CWD { CWD $args $fsock }
    CDUP { CDUP $fsock }
    DELE { DELE $fsock $line..."
    (procedure "parseline" line 6)
    invoked from within
    "parseline $line $sock "
    (procedure "readlinefromsocket" line 10)
    invoked from within
    "readlinefromsocket sock24"

    re-initializing mfs_ftp

    close the current ftp connection and simply open another

    "core dump"

    info(version): 1.2.9p-patchlevel-20080512
    info(tswv): 9.4-01-2-648
    info(dbl): 0
    info(ithrottle): 2
    info(insert_priority): 10
    info(multithreaded): 0
    info(saveuntil): suggestion
    info(name_detail): 5
    info(bjuggle): 0
    info(active): 0
    info(ac_interval): 1800
    info(gatewayip): 127.0.0.1
    info(gatewayport): 3105

  7. #7
    Join Date
    Aug 2004
    Posts
    4,085
    The PASV bug is fixed in patches that have been posted. You version says "patchlevel-20080512", so you probably have the PASV fixes.

    Looks to me like it is treating the "{*" wildcard string you are passing in as a regular expression, where "{" has a special meaning and would need to be escaped.
    Last edited by Jamie; 10-13-2008 at 06:54 PM.

  8. #8
    Join Date
    Feb 2007
    Posts
    72
    ok, but it also fails with:

    mget *
    mget *M* (matches all files because they all say AM or PM)
    mget *ts
    mget *.ts

    Here is error output with a plain old "mget *"


    08:27:54:PM - 226 Transfer complete.
    08:27:57:PM - 200 Type set to I
    08:28:02:PM - 200 Type set to I
    08:28:02:PM - 227 Entering Passive Mode (192,168,0,11,12,32).
    08:28:02:PM - 150 Opening ASCII mode data connection for file list.
    08:28:07:PM - updating cached recording info
    ..................................................................

    ..................................................................

    bgerror invoked with error

    " couldn't compile regular expression pattern: quantifier operand invalid "

    errorInfo:
    couldn't compile regular expression pattern: quantifier operand invalid
    while executing
    "regexp -nocase $matchstr $info($fsid,rec_filename)"
    (procedure "NLST" line 19)
    invoked from within
    "NLST $line $fsock "
    ("NLST" arm line 1)
    invoked from within
    "switch $cmd {
    USER { USER $fsock $line }
    PASS { PASS $fsock $line }
    CWD { CWD $args $fsock }
    CDUP { CDUP $fsock }
    DELE { DELE $fsock $line..."
    (procedure "parseline" line 6)
    invoked from within
    "parseline $line $sock "
    (procedure "readlinefromsocket" line 10)
    invoked from within
    "readlinefromsocket sock24"

    re-initializing mfs_ftp

    close the current ftp connection and simply open another

    "core dump"

    info(version): 1.2.9p-patchlevel-20080512
    info(tswv): 9.4-01-2-648
    info(dbl): 0
    info(ithrottle): 2
    info(insert_priority): 10
    info(multithreaded): 0
    info(saveuntil): suggestion
    info(name_detail): 5
    info(bjuggle): 0
    info(active): 0
    info(ac_interval): 1800
    info(gatewayip): 127.0.0.1
    info(gatewayport): 3105



    Comments ? Additional information - I am runnnig with that s3tots code that presents .ts files directly to mfs_ftp - so you can download real .ts files and not convert them after the fact. I wonder if that is breaking things ?

  9. #9
    Join Date
    Feb 2007
    Posts
    72
    ok then. craptastic.

  10. #10
    Join Date
    Aug 2004
    Posts
    4,085
    mfs_ftp is unsupported. If you want a supported tool, you need to look elsewhere.

    I can't reproduce this error. If you want it fixed, you may need to roll up your sleeves and do some TCL debugging. It looks like it is complaining about the regular expression in $matchstr. Perhaps you can print it out before the failure so we can see what it is?

  11. #11
    Join Date
    Feb 2007
    Posts
    72
    ok, here is the entire log from a full ftp session with attempted mget:


    info(gatewayip): 127.0.0.1
    info(gatewayport): 3105


    catch close lastsock val "can not find channel named "sock24""
    04:51:47:PM - updating cached recording info
    ...................................................................

    ...................................................................

    ^M
    ^M
    09:18:10:PM - 220 Mfs_Ftp ver 1.2.9p-patchlevel-20080512 - {sock24} from "192.168.0.10:50668"
    09:18:14:PM - 331 User name okay, need password.
    09:18:14:PM - 230 Running in TiVo Mode.
    09:18:14:PM - 215 UNIX
    09:18:14:PM - 502 Command not implemented "FEAT"
    09:18:14:PM - 257 "/" is current directory.
    09:18:16:PM - 250 Directory change successful.
    09:18:16:PM - 257 "/ts" is current directory.
    09:18:21:PM - 502 Command not implemented "EPSV"
    09:18:21:PM - 227 Entering Passive Mode (192,168,0,11,12,32).
    09:18:21:PM - 150 Opening ASCII mode data connection for file list.
    09:18:23:PM - updating cached recording info
    ...................................................................

    ...................................................................

    09:18:34:PM - 226 Transfer complete.
    09:18:39:PM - 200 Type set to I
    09:18:49:PM - 200 Type set to I
    09:18:49:PM - 227 Entering Passive Mode (192,168,0,11,12,32).
    09:18:49:PM - 150 Opening ASCII mode data connection for file list.
    09:18:50:PM - updating cached recording info
    ...................................................................

    ...................................................................

    bgerror invoked with error

    " couldn't compile regular expression pattern: quantifier operand invalid "

    errorInfo:
    couldn't compile regular expression pattern: quantifier operand invalid
    while executing
    "regexp -nocase $matchstr $info($fsid,rec_filename)"
    (procedure "NLST" line 19)
    invoked from within
    "NLST $line $fsock "
    ("NLST" arm line 1)
    invoked from within
    "switch $cmd {
    USER { USER $fsock $line }
    PASS { PASS $fsock $line }
    CWD { CWD $args $fsock }
    CDUP { CDUP $fsock }
    DELE { DELE $fsock $line..."
    (procedure "parseline" line 6)
    invoked from within
    "parseline $line $sock "
    (procedure "readlinefromsocket" line 10)
    invoked from within
    "readlinefromsocket sock24"

    re-initializing mfs_ftp

    close the current ftp connection and simply open another

    "core dump"

    info(version): 1.2.9p-patchlevel-20080512
    info(tswv): 9.4-01-2-648
    info(dbl): 0
    info(ithrottle): 2
    info(insert_priority): 10
    info(multithreaded): 0
    info(saveuntil): suggestion
    info(name_detail): 5
    info(bjuggle): 0
    info(active): 0
    info(ac_interval): 1800
    info(gatewayip): 127.0.0.1
    info(gatewayport): 3105


    catch close lastsock val ""



    that is the entire log. On the client side, it looked like this:


    #ftp 192.168.0.11 3105
    Connected to 192.168.0.11.
    220 Mfs_Ftp ver 1.2.9p-patchlevel-20080512 - {sock24} from "192.168.0.10:55638"
    Name (192.168.0.11:root):
    331 User name okay, need password.
    Password:
    230 Running in TiVo Mode.
    Remote system type is UNIX.
    ftp> cd ts
    250 Directory change successful.
    ftp> bin
    200 Type set to I
    ftp> hash
    Hash mark printing on (1024 bytes/hash mark).
    ftp> prompt
    Interactive mode off.
    ftp> mget *
    Command not implemented "EPSV"
    ftp>
    ftp>
    (disconnected at this point)


    So, does this full log give any hints ?

    Many thanks.

  12. #12
    Join Date
    Aug 2004
    Posts
    4,085
    Quote Originally Posted by tiver View Post
    So, does this full log give any hints ?
    Not really. It might give more if you crank the debug level "info(dbl)" up to 5.

    What's the value of $matchstr at the point of the failure?

  13. #13
    Join Date
    Feb 2007
    Posts
    72
    WHere are you setting this debuglevel for mfs_ftp ?

    I was going to just change syslog.conf, but that does not seem to be where that debug level is set ...

    thanks.

  14. #14
    Join Date
    Aug 2004
    Posts
    4,085
    I believe it comes from settings.tcl in the mfs_ftp directory.

  15. #15
    Join Date
    Feb 2007
    Posts
    72
    Ok.

    Unfortunately, you can't "mount -uw /" on linux like you can on FreeBSD to change a read-only filesystem to read-write on the fly.

    So I am having trouble editing settings.tcl because my '/' is read-only.

    I am thinking of killing mfs_ftp and restarting it on the command line with an alternate config file that I create in /var ... any tips on how to do this ?

    killall mfs_ftp

    then ...

    ??

Posting Permissions

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