Loading ...
Sorry, an error occurred while loading the content.
 

Re: [nslu2-general] vsftpd

Expand Messages
  • Gerald L. Clark
    ... Busybox provides netstat. lsof also shows open ports and the programs using them. -- nslu-linux - glc
    Message 1 of 15 , Jul 4, 2005
      rndilger wrote:
      > This is a follow up question about the problems newbies (like myself)
      > have been having using vsftpd. I was wondering whether linux commands
      > exist to determine what programs are using a particular port? For
      > example, when I try to start vsftpd, I get the error that the server
      > socket cannot be bound because port 21 is already in use. I would just
      > like to know a simple diagnostic protocol to fix these problems. Any
      > assistance would be appreciated.
      >
      > Thanks,
      >
      > Ryan
      Busybox provides netstat.

      lsof also shows open ports and the programs using them.

      --
      nslu-linux - glc
    • Robert Hammond
      In message , Gerald L. Clark writes ... I just ran this command, part of the output is : -
      Message 2 of 15 , Jul 5, 2005
        In message <42C9E6D2.6000607@...>, Gerald L. Clark
        <gerald_clark@...> writes
        >rndilger wrote:
        >> This is a follow up question about the problems newbies (like myself)
        >> have been having using vsftpd. I was wondering whether linux commands
        >> exist to determine what programs are using a particular port? For
        >> example, when I try to start vsftpd, I get the error that the server
        >> socket cannot be bound because port 21 is already in use. I would just
        >> like to know a simple diagnostic protocol to fix these problems. Any
        >> assistance would be appreciated.
        >>
        >> Thanks,
        >>
        >> Ryan
        >Busybox provides netstat.
        >
        I just ran this command, part of the output is : -

        netstat: no support for `AF INET6 (tcp)' on this system.
        netstat: no support for `AF INET6 (udp)' on this system.
        netstat: no support for `AF INET6 (raw)' on this system.

        Does this mean that this command is bust in some way??

        --
        Robert Hammond
        PGP:0x154144DA
      • Robert Hammond
        In message , Gerald L. Clark writes ... Including the -l flag with the netstat call seems to
        Message 3 of 15 , Jul 5, 2005
          In message <42C9E6D2.6000607@...>, Gerald L. Clark
          <gerald_clark@...> writes
          >rndilger wrote:
          >> This is a follow up question about the problems newbies (like myself)
          >> have been having using vsftpd. I was wondering whether linux commands
          >> exist to determine what programs are using a particular port? For
          >> example, when I try to start vsftpd, I get the error that the server
          >> socket cannot be bound because port 21 is already in use. I would just
          >> like to know a simple diagnostic protocol to fix these problems. Any
          >> assistance would be appreciated.
          >>
          >> Thanks,
          >>
          >> Ryan
          >Busybox provides netstat.
          >
          Including the -l flag with the netstat call seems to display all
          listening ports.

          I have only loaded busybox-base so the following uses the direct program
          call /opt/bin/busybox netstat -l rather than just netstat -l

          Console screen output

          # /opt/bin/busybox netstat -l
          Active Internet connections (only servers)
          Proto Recv-Q Send-Q Local Address Foreign Address State
          tcp 0 0 *:netbios-ssn *:*
          LISTEN
          tcp 0 0 *:www *:*
          LISTEN
          tcp 0 0 *:ftp *:*
          LISTEN
          tcp 0 0 *:ssh *:*
          LISTEN
          tcp 0 0 *:telnet *:*
          LISTEN
          tcp 0 0 *:888 *:*
          LISTEN
          netstat: no support for `AF INET6 (tcp)' on this system.
          udp 0 0 NSLU2-1:netbios-ns *:*
          udp 0 0 *:netbios-ns *:*
          udp 0 0 NSLU2-1:netbios-dgm *:*
          udp 0 0 *:netbios-dgm *:*
          udp 0 0 *:915 *:*
          udp 0 0 *:917 *:*
          udp 0 0 *:918 *:*
          netstat: no support for `AF INET6 (udp)' on this system.
          netstat: no support for `AF INET6 (raw)' on this system.
          Active UNIX domain sockets (only servers)
          Proto RefCnt Flags Type State I-Node Path
          unix 2 [ ACC ] STREAM LISTENING 1216 /tmp/mysql.sock


          --
          Robert Hammond
          PGP:0x154144DA
        • AdamB
          ... The busybox package can conflict with other packages if you are installing a lot of packages. I packaged net-tools for the slug to get round that problem.
          Message 4 of 15 , Jul 5, 2005
            --- In nslu2-general@yahoogroups.com, "Gerald L. Clark"
            <gerald_clark@m...> wrote:


            > Busybox provides netstat.
            >

            The busybox package can conflict with other packages if you are
            installing a lot of packages. I packaged net-tools for the slug to get
            round that problem. With the net-tools version of netstat then

            netstat -atp

            will tell you which program is listening on which TCP socket. It needs
            to run as root to get the program names.
          • Robert Hammond
            In message , AdamB writes ... I must have missed the introduction of this package, your command line above
            Message 5 of 15 , Jul 5, 2005
              In message <daeqhp+rplk@...>, AdamB <slug@...>
              writes
              >--- In nslu2-general@yahoogroups.com, "Gerald L. Clark"
              ><gerald_clark@m...> wrote:
              >
              >
              >> Busybox provides netstat.
              >>
              >
              >The busybox package can conflict with other packages if you are
              >installing a lot of packages. I packaged net-tools for the slug to get
              >round that problem. With the net-tools version of netstat then
              >
              >netstat -atp
              >
              >will tell you which program is listening on which TCP socket. It needs
              >to run as root to get the program names.
              >
              I must have missed the introduction of this package, your command line
              above produces an informative output.


              Interestingly I can reproducibly generate a small display bug with this
              program.

              Using the command netstat -N gives the following output : -
              (gives the incorrect local address for the netbios-ssn connection).

              # netstat -N
              Active Internet connections (w/o servers)
              Proto Recv-Q Send-Q Local Address Foreign Address
              State
              tcp 0 52 192.168.1.77:ssh 192.168.1.50:3180
              ESTABLISHED
              tcp 0 0 192.168.1.7:netbios-ssn 192.168.1.50:1031
              ESTABLISHED
              Active UNIX domain sockets (w/o servers)
              Proto RefCnt Flags Type State I-Node Path
              unix 2 [ ] DGRAM 26 /var/tmp/log



              --
              Robert Hammond
              PGP:0x154144DA
            • rst77469
              Ryan I just posted a note a few days ago about experience w/ vsftpp...I gave up and got proftpd to work...here s an except from my note if you go the proftpd
              Message 6 of 15 , Jul 5, 2005
                Ryan

                I just posted a note a few days ago about experience w/ vsftpp...I gave
                up and got proftpd to work...here's an except from my note if you go
                the proftpd route
                ----
                After giving up on vsftpd, I installed proftpd and it wouldn't work
                either. I tried to run proftpd as a standalone and that didn't work
                either.

                I finally traced this to an /opt/etc/inetd.conf file that still had the
                vsftpd config information in it (after I used ipkg remove vsftpd).

                "ftp stream tcp nowait root /opt/sbin/vsftpd
                /opt/etc/vsftpd.conf"

                which is created by the diversion script I added as in the vsfptd howto.

                when I created a new blank inetd.conf, proftpd worked fine

                As I noted I'm a linux newbie, but my guess is that the old line in the
                inetd.conf was consuming port 21 with the ftp command. After I cleared
                the inetd.conf file, proftpd works fine.
                -----
                I just wonder if the advice in the howto to make the diversion script
                has some error in it. Suggest you try deleting the diversion script
                and the inet.d file mentoned above and see if vsftpd works. I'd be
                interested because proftpd seems somewhat slugish in response.

                Best of luck

                Bob (fellow linux newbie).


                --- In nslu2-general@yahoogroups.com, "rndilger" <rdilger2@u...> wrote:
                > This is a follow up question about the problems newbies (like myself)
                > have been having using vsftpd. I was wondering whether linux commands
                > exist to determine what programs are using a particular port? For
                > example, when I try to start vsftpd, I get the error that the server
                > socket cannot be bound because port 21 is already in use. I would
                just
                > like to know a simple diagnostic protocol to fix these problems. Any
                > assistance would be appreciated.
                >
                > Thanks,
                >
                > Ryan
              • rndilger
                ... gave ... Bob, I appreciated your comments about proftp. However, I am intent on getting vsftpd to work. I also believe there may be an error in the howto
                Message 7 of 15 , Jul 6, 2005
                  --- In nslu2-general@yahoogroups.com, "rst77469" <rst@n...> wrote:
                  > Ryan
                  >
                  > I just posted a note a few days ago about experience w/ vsftpp...I
                  gave
                  > up and got proftpd to work...

                  Bob,

                  I appreciated your comments about proftp. However, I am intent on
                  getting vsftpd to work. I also believe there may be an error in the
                  howto or diversion script, but my newbie inexperience limits my
                  diagnostic ability in linux. I have to assume that someone perusing
                  this forum has successfully configured vsftpd on a slug. Therefore, it
                  would most helpful if documentation could be provided that spells out
                  exactly which files need to be present on the slug, correct diversion
                  scripts required, and any other "tricks" that are needed.

                  This forum has been most helpful in setting up my first slug and I am
                  thankful to all who have worked on this project. I am optimistic that
                  these vsftpd problems can be worked out in simple terms for newbies
                  like myself.

                  Thanks,

                  Ryan
                • Aaron Hoyt
                  Ryan, You are right. I, another newbie have managed to configure vsftpd. I did it on an older release of Unslung 3.18. I am suspicious something in a later
                  Message 8 of 15 , Jul 6, 2005
                    Ryan,
                    You are right. I, another newbie have managed to configure vsftpd.
                    I did it on an older release of Unslung 3.18.
                    I am suspicious something in a later release broke things due to the
                    attention and lack of resolution.
                    Can you restate the questions you are having and so I can see if I have
                    anything that might be of value to add?
                    Thanks,
                    Aaron

                    -----Original Message-----
                    From: nslu2-general@yahoogroups.com
                    [mailto:nslu2-general@yahoogroups.com]On Behalf Of rndilger
                    Sent: Wednesday, July 06, 2005 11:07 AM
                    To: nslu2-general@yahoogroups.com
                    Subject: [nslu2-general] Re: vsftpd


                    --- In nslu2-general@yahoogroups.com, "rst77469" <rst@n...> wrote:
                    > Ryan
                    >
                    > I just posted a note a few days ago about experience w/ vsftpp...I
                    gave
                    > up and got proftpd to work...

                    Bob,

                    I appreciated your comments about proftp. However, I am intent on
                    getting vsftpd to work. I also believe there may be an error in the
                    howto or diversion script, but my newbie inexperience limits my
                    diagnostic ability in linux. I have to assume that someone perusing
                    this forum has successfully configured vsftpd on a slug. Therefore, it
                    would most helpful if documentation could be provided that spells out
                    exactly which files need to be present on the slug, correct diversion
                    scripts required, and any other "tricks" that are needed.

                    This forum has been most helpful in setting up my first slug and I am
                    thankful to all who have worked on this project. I am optimistic that
                    these vsftpd problems can be worked out in simple terms for newbies
                    like myself.

                    Thanks,

                    Ryan





                    Yahoo! Groups Links
                  • caplink811
                    ... wrote: Hi, ... Sure, that s simple ;-) 1. Uninstall vsftpd - ipkg remove vsftpd 2. update the package list - ipkg update 3. Install InetUtils - ipkg
                    Message 9 of 15 , Jul 6, 2005
                      --- In nslu2-general@yahoogroups.com, "rndilger" <rdilger2@u...>
                      wrote:

                      Hi,

                      > diagnostic ability in linux. I have to assume that someone perusing
                      > this forum has successfully configured vsftpd on a slug. Therefore,

                      Sure, that's simple ;-)

                      1. Uninstall vsftpd -> ipkg remove vsftpd
                      2. update the package list -> ipkg update
                      3. Install InetUtils -> ipkg install inetutils
                      - This install an other inetd which is placed in /opt/libexec.
                      - Create the file /opt/etc/inetd.conf, and fill it with

                      [root@linus root]$ cat /opt/etc/inetd.conf
                      telnet stream tcp nowait root /usr/sbin/telnetd
                      ftp stream tcp nowait root /opt/sbin/vsftpd vsftpd
                      /opt/etc/vsftpd.conf

                      (The third line is the remain part of the second line, so put line 2+3
                      in one line)

                      - Run /opt/etc/init.d/S52inetd, this command kills the linksys inetd
                      and start the new inetd in /opt/libexec. All files in /opt/etc/init.d
                      which start with the letter S, are executed at each startup of the
                      nslu.
                      - Now it's a good time to try telnet with the new inetd, this should
                      work. If the telnet access works, then you can try to ftp in.
                      - If things went wrong, then you should check, whether the right inetd
                      is running

                      [root@linus conf]$ ps -ef
                      13626 root 1520 S /opt/libexec/inetd /opt/etc/inetd.conf

                      Should give you an output like above (1st and 3rd column can differs).

                      After this, there's no need for a diversion script
                      ([/unslung/|/share/hdd/conf/unslung/]rc.xinetd) which modifies the
                      /etc/inetd.conf, cause this file is no more in use.

                      bye
                      JrB

                      PS: feel free to join #nslu2-general at irc.freenode.net
                    • AdamB
                      ... I believe that is a feature not a bug, I ve noticed such issues on other Linux boxes and with the Solaris version (based on different source). The
                      Message 10 of 15 , Jul 6, 2005
                        --- In nslu2-general@yahoogroups.com, Robert Hammond
                        <rob.hammond@n...> wrote:

                        >
                        > Interestingly I can reproducibly generate a small display bug with this
                        > program.
                        >
                        > Using the command netstat -N gives the following output : -
                        > (gives the incorrect local address for the netbios-ssn connection).
                        >
                        > # netstat -N
                        > Active Internet connections (w/o servers)
                        > Proto Recv-Q Send-Q Local Address Foreign Address
                        > State
                        > tcp 0 52 192.168.1.77:ssh 192.168.1.50:3180
                        > ESTABLISHED
                        > tcp 0 0 192.168.1.7:netbios-ssn 192.168.1.50:1031
                        > ESTABLISHED

                        I believe that is a "feature" not a bug, I've noticed such issues on
                        other Linux boxes and with the Solaris version (based on different
                        source). The program does its best to display the address and port
                        within a quite limited field width. Sometimes it makes a bad decision
                        as to how to acheive that.
                      • rndilger
                        Aaron, Sure, all I am trying to do is to get vsftpd running. I ve already updated busybox but cannot see that vsftpd is running using the ps command. I
                        Message 11 of 15 , Jul 6, 2005
                          Aaron,

                          Sure, all I am trying to do is to get vsftpd running. I've already
                          updated busybox but cannot see that vsftpd is running using the ps
                          command. I originally followed the how-to and added a diversion
                          script. However, restarting xinetd gave me the error that the socket
                          was busy and it could not use that socket. Therefore, I posed the
                          question whether anyone could spell out (in simple terms) how they
                          had successfully configured vsftpd. I received a good explanation
                          from JrB but it involved addind the inetutils package. First, I
                          thought this was being phased out and second, this package would not
                          install because I have updated busybox.

                          So my question boils down to whether someone can walk a newbie
                          through a seemingly simple configuration of vsftpd.

                          Thanks,

                          Ryan


                          --- In nslu2-general@yahoogroups.com, "Aaron Hoyt" <aaron.hoyt@v...>
                          wrote:
                          > Ryan,
                          > You are right. I, another newbie have managed to configure vsftpd.
                          > I did it on an older release of Unslung 3.18.
                          > I am suspicious something in a later release broke things due to
                          the
                          > attention and lack of resolution.
                          > Can you restate the questions you are having and so I can see if I
                          have
                          > anything that might be of value to add?
                          > Thanks,
                          > Aaron
                          >
                          > -----Original Message-----
                          > From: nslu2-general@yahoogroups.com
                          > [mailto:nslu2-general@yahoogroups.com]On Behalf Of rndilger
                          > Sent: Wednesday, July 06, 2005 11:07 AM
                          > To: nslu2-general@yahoogroups.com
                          > Subject: [nslu2-general] Re: vsftpd
                          >
                          >
                          > --- In nslu2-general@yahoogroups.com, "rst77469" <rst@n...> wrote:
                          > > Ryan
                          > >
                          > > I just posted a note a few days ago about experience w/
                          vsftpp...I
                          > gave
                          > > up and got proftpd to work...
                          >
                          > Bob,
                          >
                          > I appreciated your comments about proftp. However, I am intent on
                          > getting vsftpd to work. I also believe there may be an error in the
                          > howto or diversion script, but my newbie inexperience limits my
                          > diagnostic ability in linux. I have to assume that someone perusing
                          > this forum has successfully configured vsftpd on a slug.
                          Therefore, it
                          > would most helpful if documentation could be provided that spells
                          out
                          > exactly which files need to be present on the slug, correct
                          diversion
                          > scripts required, and any other "tricks" that are needed.
                          >
                          > This forum has been most helpful in setting up my first slug and I
                          am
                          > thankful to all who have worked on this project. I am optimistic
                          that
                          > these vsftpd problems can be worked out in simple terms for newbies
                          > like myself.
                          >
                          > Thanks,
                          >
                          > Ryan
                          >
                          >
                          >
                          >
                          >
                          > Yahoo! Groups Links
                        • Aaron Hoyt
                          Ryan, your other set of packages are well beyond what I used. FTP was my first and only concern so after reading the WIKI I did not update Busybox and did not
                          Message 12 of 15 , Jul 7, 2005
                            Ryan,
                            your other set of packages are well beyond what I used. FTP was my first
                            and only concern so after reading the WIKI I did not update Busybox and did
                            not install any other packages first.
                            The biggest lesson that I learned (keep in mind I am real new to this) was
                            that I needed to do my editing of my scripts on the box itself using telnet
                            or ssh. I was creating the scripts on my XP machine using notepad and then
                            transferring them to the box. This proved to be useless and frustrating and
                            until I learned about vi, I was lost at getting things configured. Even
                            then, I had to do some quick google work to figure out how to operate vi.
                            Once I got to that point, I followed
                            http://www.nslu2-linux.org/wiki/Unslung/Vsftpd basically to the letter.
                            I did follow links on that page to teach myself how to configure vsftpd to
                            my needs after it was installed.
                            I guess I can't offer much, but maybe something will lead you in a helpful
                            direction.
                            Aaron
                          • caplink811
                            ... Hi, ... 1st, the package is avaiable as an ipk in the repo, 2nd, if you run in trouble with the installation, you should try ipkf -force-overwrite
                            Message 13 of 15 , Jul 7, 2005
                              --- In nslu2-general@yahoogroups.com, "rndilger" <rdilger2@u...> wrote:

                              Hi,

                              > from JrB but it involved addind the inetutils package. First, I
                              > thought this was being phased out and second, this package would not
                              > install because I have updated busybox.

                              1st, the package is avaiable as an ipk in the repo, 2nd, if you run in
                              trouble with the installation, you should try "ipkf -force-overwrite
                              ginstall packagename", so each already existing file is overwritten by
                              the installer.

                              bye
                              JrB
                            Your message has been successfully submitted and would be delivered to recipients shortly.