Problems mounting NETWARE FT server

Help
Joni
2004-09-22
2013-06-04
  • Joni
    Joni
    2004-09-22

    Hello everyone,

    I would very much like to use LUFS to mount a NETWARE FTP server. I am using Fedora Core 2 with kernel 2.6.8 on i386 architecture and gcc 3.3.3. I have compiled LUFS and am able to mount various FTP servers without problems :)

    However the FTP server I would like to mount is giving me some trouble. I am able to login, but when I do a directory listing instead of files and
    directories I get questions marks. The server I am connecting to is a NETWARE FTP server, but I have tested the server with various clients and
    they all work good. Even when I manually telnet to the FTP server (in passive mode) I am able to get directory listings.

    I have added a line to my /etc/fstab as follows:

    none /mnt/rtlblvd lufs fs=ftpfs,host=xxxxxxxxxxxx,username=rtlblvd,password=xxxxxxxx 0 0

    Below you may find the debug stderr and stdout. I have marked out the password and ip of the server because it is restricted and I am not allowed to
    disclose them. Sorry about that :)

    I would really appreciate if someone could give me some hints on this issue.

    Thanks!
    Jonathan

    stderr:

    [7eda](execute_open_passive)bad server response!
    [7eda](do_read)couldn't open data connection!
    [7edb](parse_line)could only match 1 attributes!

    stdout:

    [7eda](lu_opt_parse) domain not found, creating...
    [7eda](lu_opt_parse) option: rw
    [7eda](lu_opt_parse) flag
    [7eda](lu_opt_parse) option: fs=ftpfs
    [7eda](lu_opt_parse) option with parameter
    [7eda](lu_opt_parse) option: host=xxxxxxxxxxxxx
    [7eda](lu_opt_parse) option with parameter
    [7eda](lu_opt_parse) option: username=rtlblvd
    [7eda](lu_opt_parse) option with parameter
    [7eda](lu_opt_parse) option with parameter
    [7eda](lu_opt_parse) hiding password...
    [7eda](lu_opt_loadcfg) loading config from /etc/lufsd.conf
    [7eda](lu_opt_loadcfg) class: #LUFSD#
    [7eda](lu_opt_loadcfg) key: #DirCacheTTL#
    [7eda](lu_opt_loadcfg) val: #20#
    [7eda](lu_opt_loadcfg) class not found, creating...
    [7eda](lu_opt_loadcfg) class: #LUFSD#
    [7eda](lu_opt_loadcfg) key: #DirCacheEntries#
    [7eda](lu_opt_loadcfg) val: #6#
    [7eda](find_domain) domain found
    [7eda](lu_opt_loadcfg) class: #FTPFS#
    [7eda](lu_opt_loadcfg) key: #DataConnectionMode#
    [7eda](lu_opt_loadcfg) val: #Passive#
    [7eda](lu_opt_loadcfg) class not found, creating...
    [7eda](lu_opt_loadcfg) class: #FTPFS#
    [7eda](lu_opt_loadcfg) key: #RWTimeout#
    [7eda](lu_opt_loadcfg) val: #10#
    [7eda](find_domain) domain found
    [7eda](lu_opt_loadcfg) class: #GNETFS#
    [7eda](lu_opt_loadcfg) key: #KnownPeers#
    [7eda](lu_opt_loadcfg) val: #10#
    [7eda](lu_opt_loadcfg) class not found, creating...
    [7eda](lu_opt_loadcfg) class: #GNETFS#
    [7eda](lu_opt_loadcfg) key: #Host1#
    [7eda](lu_opt_loadcfg) val: #connect1.gnutellanet.com:6346#
    [7eda](find_domain) domain found
    [7eda](lu_opt_loadcfg) class: #GNETFS#
    [7eda](lu_opt_loadcfg) key: #Host2#
    [7eda](lu_opt_loadcfg) val: #connect2.gnutellanet.com:6346#
    [7eda](find_domain) domain found
    [7eda](lu_opt_loadcfg) class: #GNETFS#
    [7eda](lu_opt_loadcfg) key: #Host3#
    [7eda](lu_opt_loadcfg) val: #connect3.gnutellanet.com:6346#
    [7eda](find_domain) domain found
    [7eda](lu_opt_loadcfg) class: #GNETFS#
    [7eda](lu_opt_loadcfg) key: #Host4#
    [7eda](lu_opt_loadcfg) val: #connect4.gnutellanet.com:6346#
    [7eda](find_domain) domain found
    [7eda](lu_fsctl_create) creating fs_ctl
    [7eda](lu_cache_create) creating dir cache...
    [7eda](lu_opt_getchar) retrieving LUFSD::DirCacheTTL
    [7eda](find_domain) domain found
    [7eda](lu_opt_getchar) key found
    [7eda](lu_opt_getchar) retrieving MOUNT::dir_cache_ttl
    [7eda](find_domain) domain found
    [7eda](lu_opt_getchar) key not found
    [7eda](lu_opt_getchar) retrieving LUFSD::DirCacheEntries
    [7eda](find_domain) domain found
    [7eda](lu_opt_getchar) key found
    [7eda](lu_opt_getchar) retrieving MOUNT::dir_cache_entries
    [7eda](find_domain) domain found
    [7eda](lu_opt_getchar) key not found
    [7eda](lu_cache_create) entries: 6, ttl: 20
    [7eda](lu_opt_getchar) retrieving MOUNT::fs
    [7eda](find_domain) domain found
    [7eda](lu_opt_getchar) key found
    [7eda](get_filesystem) trying to load liblufs-ftpfs.so
    [7eda](get_filesystem) lib opened
    [7eda](get_filesystem) file system loaded
    [7eda](lu_opt_getchar) retrieving MOUNT::username
    [7eda](find_domain) domain found
    [7eda](lu_opt_getchar) key found
    [7eda](lu_opt_getchar) retrieving MOUNT::host
    [7eda](find_domain) domain found
    [7eda](lu_opt_getchar) key found
    [7eda](FTPFS)in constructor
    [7eda](lu_opt_getchar) retrieving FTPFS::RWTimeout
    [7eda](find_domain) domain found
    [7eda](lu_opt_getchar) key found
    [7eda](FTPFS)RWTimeout set to a
    [7eda](lu_opt_getchar) retrieving FTPFS::DataConnectionMode
    [7eda](find_domain) domain found
    [7eda](lu_opt_getchar) key found
    [7eda](FTPFS)DataConnectionMode set to Passive
    [7eda](lu_opt_getchar) retrieving MOUNT::ftpactive
    [7eda](find_domain) domain found
    [7eda](lu_opt_getchar) key not found
    [7eda](lu_opt_getchar) retrieving MOUNT::ftppassive
    [7eda](find_domain) domain found
    [7eda](lu_opt_getchar) key not found
    [7eda](lu_opt_getchar) retrieving MOUNT::port
    [7eda](find_domain) domain found
    [7eda](lu_opt_getchar) key not found
    [7eda](lu_opt_getchar) retrieving MOUNT::username
    [7eda](find_domain) domain found
    [7eda](lu_opt_getchar) key found
    [7eda](lu_opt_getchar) retrieving MOUNT::password
    [7eda](find_domain) domain found
    [7eda](lu_opt_getchar) key found
    [7eda](lu_opt_getchar) retrieving MOUNT::host
    [7eda](find_domain) domain found
    [7eda](lu_opt_getchar) key found
    [7eda](FTPConnection)in constructor
    [7eda](do_mount)
    [7eda](connect)trying to connect to 217.118.162.247...
    [7eda](connect)connect succeded...

    [7eda](get_response)line: 220-Welcome to the ftp server!

    [7eda](get_response)line: 220-

    [7eda](get_response)line: 220 Service Ready for new User

    [7eda](execute)executing USER rtlblvd
    [7eda](get_response)line: 331 Password Needed for Login

    [7eda](execute)executing PASS xxxxxxxx
    [7eda](get_response)line: 230 User rtlblvd Logged in Successfully

    [7eda](execute)executing SYST
    [7eda](connect)logged in. system type is NETWARE.
    [7eda](do_mount)list command: LIST -al
    [7eda](load_credentials) loading remote credentials for rtlblvd
    [7eda](do_open)
    [7eda](do_read)read /etc/passwd, 0, 3b6
    [7eda](execute_open_passive)dsock: 0,dfd: 0,last_off: 0,last_cmd:
    [7eda](execute_open_passive)reopening data connection...
    [7eda](execute)executing PASV
    [7eda](getIP)buf: (x,x,x,x,30,150)

    [7eda](getIP)(i0,i1,i2,i3,p0,p1)=(xx,xx,xx,xx,1e,96)
    [7eda](getIP)IP: d976a2f7(x.x.x.x)
    [7eda](getIP)port: 1e96
    [7eda](execute)executing TYPE I
    [7eda](get_response)line: 200 TYPE Command OK I

    [7eda](execute)executing RETR /etc/passwd
    [7eda](get_response)line: 550 Invalid Path

    [7eda](do_release)
    [7eda](load_credentials) read failed
    [7eda](lu_fsctl_mount) could not load credentials.
    [7eda](tempsock) trying address /tmp/lufsd1267372604
    [7eda](main) starting filesystem master at /tmp/lufsd1267372604
    [7edc](main) executing lufsmnt /mnt/rtlblvd rw,fs=ftpfs,host=x.x.x.x,username=rtlblvd,password=xxxxxxxx,server_socket=/tmp/lufsd1267372604,server_pid=32475
    [7edc](main) execvp of lufsmnt failed: No such file or directory
    [7edc](main) you don't seem to have lufsmnt in your path. trying regular locations...
    [7edc](main) trying /usr/local/bin/lufsmnt /mnt/rtlblvd rw,fs=ftpfs,host=x.x.x.x,username=ound
    [7eda](lu_opt_getchar) key found
    [7eda](FTPConnection)in constructor
    [7eda](do_mount)
    [7eda](connect)trying to connect to x.x.x.x...
    [7eda](connect)connect succeded...
    [7eda](get_response)line: 220-Welcome to the ftp server!

    [7eda](get_response)line: 220-

    [7eda](get_response)line: 220 Service Ready for new User

    [7eda](execute)executing USER rtlblvd
    [7eda](get_response)line: 331 Password Needed for Login

    [7eda](execute)executing PASS xxxxxxxx
    [7eda](get_response)line: 230 User rtlblvd Logged in Successfully

    [7eda](execute)executing SYST
    [7eda](connect)logged in. system type is NETWARE.
    [7eda](do_mount)list command: LIST -al
    [7eda](load_credentials) loading remote credentials for rtlblvd
    [7eda](do_open)
    [7eda](do_read)read /etc/passwd, 0, 3b6
    [7eda](execute_open_passive)dsock: 0,dfd: 0,last_off: 0,last_cmd:
    [7eda](execute_open_passive)reopening data connection...
    [7eda](execute)executing PASV
    [7eda](getIP)buf: (x,x,x,x,30,150)

    [7eda](getIP)(i0,i1,i2,i3,p0,p1)=(xx,xx,xx,xx,1e,96)
    [7eda](getIP)IP: d976a2f7(x.x.x.x)
    [7eda](getIP)port: 1e96
    [7eda](execute)executing TYPE I
    [7eda](get_response)line: 200 TYPE Command OK I

    [7eda](execute)executing RETR /etc/passwd
    [7eda](get_response)line: 550 Invalid Path

    [7eda](do_release)
    [7eda](load_credentials) read failed
    [7eda](lu_fsctl_mount) could not load credentials.
    [7eda](tempsock) trying address /tmp/lufsd1267372604
    [7eda](main) starting filesystem master at /tmp/lufsd1267372604
    [7edb](lu_opt_getchar) retrieving MOUNT::quiet
    [7edb](find_domain) domain found
    [7edb](lu_opt_getchar) key not found
    [7edb](lu_fsctl_run) a client process connected.
    [7edb](lu_fsctl_run) using already mounted filesystem...
    [7edb](thread_launcher) thread created
    [7edb](handle_fs) entering I/O loop...
    [7edb](generic_stat) stat /
    [7edb](lu_cache_lookup_file) dir: /, file: .
    [7edb](lu_cache_lookup) looking up . in ound
    [7eda](lu_opt_getchar) key found
    [7eda](FTPConnection)in constructor
    [7eda](do_mount)
    [7eda](connect)trying to connect to x.x.x.x...
    [7eda](connect)connect succeded...
    [7eda](get_response)line: 220-Welcome to the  ftp server!

    [7eda](get_response)line: 220-

    [7eda](get_response)line: 220 Service Ready for new User

    [7eda](execute)executing USER rtlblvd
    [7eda](get_response)line: 331 Password Needed for Login

    [7eda](execute)executing PASS xxxxxxxx
    [7eda](get_response)line: 230 User rtlblvd Logged in Successfully

    [7eda](execute)executing SYST
    [7eda](connect)logged in. system type is NETWARE.
    [7eda](do_mount)list command: LIST -al
    [7eda](load_credentials) loading remote credentials for rtlblvd
    [7eda](do_open)
    [7eda](do_read)read /etc/passwd, 0, 3b6
    [7eda](execute_open_passive)dsock: 0,dfd: 0,last_off: 0,last_cmd:
    [7eda](execute_open_passive)reopening data connection...
    [7eda](execute)executing PASV
    [7eda](getIP)buf: (x,x,x,x,30,150)

    [7eda](getIP)(i0,i1,i2,i3,p0,p1)=(xx,xx,xx,xx,1e,96)
    [7eda](getIP)IP: d976a2f7(x.x.x.x)
    [7eda](getIP)port: 1e96
    [7eda](execute)executing TYPE I
    [7eda](get_response)line: 200 TYPE Command OK I

    [7eda](execute)executing RETR /etc/passwd
    [7eda](get_response)line: 550 Invalid Path

    [7eda](do_release)
    [7eda](load_credentials) read failed
    [7eda](lu_fsctl_mount) could not load credentials.
    [7eda](tempsock) trying address /tmp/lufsd1267372604
    [7eda](main) starting filesystem master at /tmp/lufsd1267372604
    [7eda](main) mount succeded

     
    • David Spreen
      David Spreen
      2004-10-31

      I have the same problem. what might be interesting is the type of directory listing you get from the server. using ncftp 'ls -la' on my uni's netware ftp server, i get the following crap:

      ls -la
      total 0
      d [RWCEAFMS] detective                         512 Oct 04 13:06 PMAIL
      d [RWCEAFMS] 0405613S                          512 Oct 29 15:26 Favorites
      d [RWCEAFMS] 0405613S                          512 Oct 29 15:26 Application Data
      d [RWCEAFMS] 0405613S                          512 Oct 29 16:24 My Documents
      d [RWCEAFMS] 0405613S                          512 Oct 31 01:53 oioioi

      would it be possible to extend the ftpfs parser to be able to cope with that?

       
    • David Spreen
      David Spreen
      2004-10-31

      I just submitted a detailed bugreport to the debian bts, since i am using the debian package. It should be
      forwarded to the upstream author anyway.

      the url of the bugreport is:

      http://bugs.debian.org/cgi-bin/bugreport.cgi?bug=279031

       
    • Joni
      Joni
      2004-11-30

      Well I have found the explanation with a possible solution (haven't tried it yet) in the NetWare documentation and this seems to confirm that the problem lies in the directory listing format:

      Why am I not able to see directory listing in my FTP client even after connecting to the NetWare FTP server?
      Explanation:  The FTP client that you are using might be one which expects UNIX-like file permissions. The NetWare FTP Server by default sends NetWare trustee rights along with the files and therefor this may be incomprehensible to your FTP client.

      http://www.novell.com/documentation/nw65/index.html?page=/documentation/nw65/ftp_enu/data/al10huq.html

      Action:  Set the PSEUDO_PERMISSIONS parameter to ON in the configuration file (Default = sys:\etc\ftpserv.cfg). Set the PSEUDO_FILE_PERMISSIONS and PSEUDO_DIR_PERMISSIONS parameters based on the kind of permissions you want to display for files and directories respectively in the FTP client.

      I will ask the NetWare admin to set this pseudo permissions, but I think it would be way better if lufs would support the NetWare dir listing format. Is anyone still supporting LUFS? In addition to posting on this forum I also tried to reach Mali and the author of the NetWare code in ftpfs, but I did not get any response!?

       
    • Joni
      Joni
      2004-12-14

      Well I have solved my problem. It's not the most chique way but I worked as follows:

      On the Netware FTP server you have to set PSEUDO_PERMISSIONS parameter to ON in the configuration file (Default = sys:\etc\ftpserv.cfg).  (see posting above). However because the server will still identify itself as a NETWARE server you need to tell LUFS that it should use the unix classes instead of the netware classes. I did this by editing lufs-0.9.7/filesystems/ftpfs/ftpfs.cpp around line 217:

      /* ftpsys initialization */
      if(!strcmp(conn->system, "NETWARE"))
      /* Original: ftpsys = new ftpsys_netware(); */
      ftpsys = new ftpsys_unix();

      Maybe someone can find & fix the real problem though and find out why the existing netware classes don't work.

      Bye,
      Jonathan