Announcement

Collapse
No announcement yet.

FTP Question - How To Setup Vsftpd With A Username And Password (Solved)

Collapse
This topic is closed.
X
X
 
  • Filter
  • Time
  • Show
Clear All
new posts

    FTP Question - How To Setup Vsftpd With A Username And Password (Solved)

    Searching this forum did not provide the answer I am looking for so I hope someone can chime in and help.

    I want to setup vsftpd in such a way that when I connect to it from any machine (via the internet) that I am prompted for a username and password. Upon entering that username and password, I want full access to my /etc/home directory. I also want to be able to see a network storage device that is on the same network.

    So, to number them logically -

    (1) How do i setup a username and password for read/write access to my /etc/home directory
    (2) How do I setup vsftpd to prompt me for that username and password?
    (3) How do I also direct vsftpd to let me see my network attached storage device (HP Media Vault)?

    Thank you,

    M
    sudo make me rich<br /><br />Kubuntu Gutsy 7.10<br />KDE 3.5<br />Compaq Presario 5000<br />Intel Celeron 1.2 Ghz<br />512 Ram, Riva TNT2 Video Card<br />All the above hardware is 7 year old junk but<br />Linux runs great on it.&nbsp; :&gt<br />Ham Radio Rules

    #2
    Re: How To Setup Vsftpd With A Username And Password

    This may answer #1 and #2. http://www.netadmintools.com/art355.html

    It looks like you just need to turn anonymous users off.

    Comment


      #3
      Re: How To Setup Vsftpd With A Username And Password

      Ok...that gets me closer as now it will not accept anonymous connections and it does prompt me for my username and password. However, I've not setup a username and password for vsftpd.

      How do I set up a username and password I'm somewhat of a Linux Noob so if there are "default" ftp passwords that are inherent in Linux, I am not aware of them.

      Thanks,

      m
      sudo make me rich<br /><br />Kubuntu Gutsy 7.10<br />KDE 3.5<br />Compaq Presario 5000<br />Intel Celeron 1.2 Ghz<br />512 Ram, Riva TNT2 Video Card<br />All the above hardware is 7 year old junk but<br />Linux runs great on it.&nbsp; :&gt<br />Ham Radio Rules

      Comment


        #4
        Re: How To Setup Vsftpd With A Username And Password

        One more item - when I do try my system username and password (the one I use when booting up Kubuntu) I get the following message:

        Command: USER mdawx
        Response: 331 Please specify the password.
        Command: PASS ******
        Response: 500 OOPS: could not open chroot() list file:/etc/vsftpd.chroot_list
        Error: Could not connect to server


        Any ideas on what this means?

        Thanks,
        m
        sudo make me rich<br /><br />Kubuntu Gutsy 7.10<br />KDE 3.5<br />Compaq Presario 5000<br />Intel Celeron 1.2 Ghz<br />512 Ram, Riva TNT2 Video Card<br />All the above hardware is 7 year old junk but<br />Linux runs great on it.&nbsp; :&gt<br />Ham Radio Rules

        Comment


          #5
          Re: How To Setup Vsftpd With A Username And Password

          It could mean the file doesn't exist, and it also could mean the permissions are not set correctly on that file.

          Well, I looked it up a little and it looks like this page has a lot of good information for you.
          http://www.vsftpdrocks.org/source/
          Check the bottom of the page for info regarding your issue.

          Comment


            #6
            Re: How To Setup Vsftpd With A Username And Password

            Originally posted by Nate
            It could mean the file doesn't exist, and it also could mean the permissions are not set correctly on that file.

            Well, I looked it up a little and it looks like this page has a lot of good information for you.
            http://www.vsftpdrocks.org/source/
            Check the bottom of the page for info regarding your issue.
            This is quite frustrating. > I just can not figure out what I'm doing wrong. When I connect to my server, I get this message:

            Status: Connection established, waiting for welcome message...
            Response: 220 Welcome To Linux Dawg. Your IP Address Has Been Logged.
            Command: USER mrwgs
            Response: 530 Permission denied.
            Error: Could not connect to server


            Here is my vsftpd.conf file:
            anonymous_enable=NO
            local_enable=YES
            dirmessage_enable=YES
            connect_from_port_20=YES
            xferlog_enable=YES
            xferlog_file=/var/log/vsftpd/vsftpd.log
            nopriv_user=nobody
            chroot_list_enable=YES
            chroot_local_user=YES
            background=YES
            listen=YES
            write_enable=Yes
            ftpd_banner=Welcome To Linux Dawg. Your IP Address Has Been Logged.
            userlist_enable=Yes
            #userlist_deny=Yes


            Here is my vsftpd.user_list
            mrwgs >>>(this is the same login I use for Kubuntu at bootup)
            geen123 >>>(this is the same password that I use to login to kubuntu and as root)


            The vsftpd.ftpusers list is empty.

            I really appreciate the help.

            m
            sudo make me rich<br /><br />Kubuntu Gutsy 7.10<br />KDE 3.5<br />Compaq Presario 5000<br />Intel Celeron 1.2 Ghz<br />512 Ram, Riva TNT2 Video Card<br />All the above hardware is 7 year old junk but<br />Linux runs great on it.&nbsp; :&gt<br />Ham Radio Rules

            Comment


              #7
              Re: FTP Question - How To Setup Vsftpd With A Username And Password

              I really think just google searching for your error messages will eventually get you what you need. I found this: http://forums.fedoraforum.org/archiv.../t-100175.html by searching for "vsftpd 530 Permission denied".

              Also, it's usually not a wise move to post your username and password onto a forum like this. There are plenty of ways for bad people to take that info and try to hack into your box. I'd probably change my pw at this point.

              Anyway, check out that link. Hope it helps!

              Comment


                #8
                Re: FTP Question - How To Setup Vsftpd With A Username And Password

                Thanks. I'll check at that link. I've found several other links via Google but they all say about the same thing - easy to setup, all you got to do is..., yada yada yada. :P I'll keep at it and post "Solved" if I can find out the deal.

                Regarding the username and password - I was wise enough not to post my actual. 8)

                M
                sudo make me rich<br /><br />Kubuntu Gutsy 7.10<br />KDE 3.5<br />Compaq Presario 5000<br />Intel Celeron 1.2 Ghz<br />512 Ram, Riva TNT2 Video Card<br />All the above hardware is 7 year old junk but<br />Linux runs great on it.&nbsp; :&gt<br />Ham Radio Rules

                Comment


                  #9
                  Re: FTP Question - How To Setup Vsftpd With A Username And Password

                  Well, now that I think I have my .conf file setup correctly, vsftpd will not start up. Even after a fresh reboot it will not start.

                  Typing sudo /etc/init.d/vsftpd start (or restart) returns a message that no vsftpd is found in /bin/...something another....grrrrr!

                  I even uninstalled and reinstalled the program. Nothing. I found that a bug had been posted but I have not investigated it further. I actually gave up.
                  sudo make me rich<br /><br />Kubuntu Gutsy 7.10<br />KDE 3.5<br />Compaq Presario 5000<br />Intel Celeron 1.2 Ghz<br />512 Ram, Riva TNT2 Video Card<br />All the above hardware is 7 year old junk but<br />Linux runs great on it.&nbsp; :&gt<br />Ham Radio Rules

                  Comment


                    #10
                    Re: FTP Question - How To Setup Vsftpd With A Username And Password

                    Another way to access your files from any computer is by using ssh and sftp (they work together). You can setup sshd on your local computer (which sounds much easier than what you were doing), then on any remote computer you can use an sftp program (like filezilla) to login. I've set this up for my own system and it's very convenient.

                    I don't know much about vsftpd, but it seems that it's related to what I just described. But sshd should be easier to setup....or at least it will definitely be easier to get lots of help setting it up.

                    Comment


                      #11
                      Re: FTP Question - How To Setup Vsftpd With A Username And Password

                      mechanism: I had similar problems when I started with vsftpd but got then straightened out and my server has been working like a charm for about 6 months now. I would recommend a few things:

                      1) Remove and purge your vsftpd install: sudo apt-get --purge remove vsftpd
                      2) If your old vsftpd.conf is still there, delete it: sudo rm /etc/vsftpd.conf
                      3) Some ISP providers block port 21 (as in my case, my ISP firewalls all ports below 1024), you can request your company to open those ports, or you can change the port on which vsftpd listens... I use 2021. In that case, to access your server, you'll have to type in your browser: ftp://yourfulldomainname.oryourIPadd...en_port_number
                      4) Reinstall and check that it created the /home/ftp directory. I don't know why you should need it if you're not going to use anonymous login, but things won't work without it! I personally changed the owner of that folder to one of the local users: sudo chown localusername ftp... but I have built a couple of non-anonymous servers in which the ftp directory is owned by root (default) and things work out fine.
                      5) vsftpd uses your local users w/passwords, so the best thing you could do is create as many local users as the ones that can access the system remotely.
                      6) Don't fool around too much with your vsftpd.conf file, after your first four changes, you should be able to access your server with your username and password, at the "/" directory, and have the same write permisions as if you logged in locally. Do only these changes:

                      anonymous_enable=YES to anonymous_enable=NO

                      #local_enable=YES to local_enable

                      #write_enable=YES to write_enable=YES

                      #local_umask=022 to local_umask=022 (only if you want rwxr-xr-x for your uploaded files!)

                      ...if you want a dual anonymous-localuser login server, things get a bit complicated with the permissions and security.

                      By the way, as Nate says, I too prefer ssh to connect to my remote server or desktop, you can do anything to your remote box, even reboot or shutdown, and even mount locally a remote ssh directory... very cool!

                      I'm going to take down my home ftp mini-server the next week or so to put in something better (it's a Celeron 366 with 128 mb of ram and 3 gb of hard disk)... although people say you can't run Linux on that hardware . In the meanwhile, I'll upload my vsftpd.conf file for anonymous-local login to the server if you want to take a look at it... but don't expect to much download speed: ftp://nejode.myftp.org:2021





                      Comment


                        #12
                        Re: FTP Question - How To Setup Vsftpd With A Username And Password

                        Hey, thanks for all the information Nejode. You seem to have been down the same path that I am currently on. I had to give up for a few days. It was just sucking my hours away every night. I connected to your server and it was BAM! FAST! - no delay at all.

                        The only thing I could see that might have been an issue for me was that the version of vsftpd that I got from the Ubuntu repository was just about 1 year old. So, I went to the vsftpd website and downloaded the latest version, had trouble installing it, got frustrated, then gave up. I've not looked at in a few days but now I will give it another try.

                        I just can't seem to let these things beat me...It is late tonight but I'll give it a try tomorrow.

                        Also, I've no idea about SSH. What exactly is that and how/why do you use it?

                        Thanks again.

                        M
                        sudo make me rich<br /><br />Kubuntu Gutsy 7.10<br />KDE 3.5<br />Compaq Presario 5000<br />Intel Celeron 1.2 Ghz<br />512 Ram, Riva TNT2 Video Card<br />All the above hardware is 7 year old junk but<br />Linux runs great on it.&nbsp; :&gt<br />Ham Radio Rules

                        Comment


                          #13
                          Re: FTP Question - How To Setup Vsftpd With A Username And Password

                          Originally posted by nejode
                          Do only these changes:

                          anonymous_enable=YES to anonymous_enable=NO

                          #local_enable=YES to local_enable

                          #write_enable=YES to write_enable=YES

                          #local_umask=022 to local_umask=022 (only if you want rwxr-xr-x for your uploaded files!)
                          Did you mean to have #local_enable=YES to local_enable=YES (to un-comment the entry)?
                          Windows no longer obstructs my view.
                          Using Kubuntu Linux since March 23, 2007.
                          "It is a capital mistake to theorize before one has data." - Sherlock Holmes

                          Comment


                            #14
                            Re: FTP Question - How To Setup Vsftpd With A Username And Password

                            Showdog:

                            No man, as is, no typos there. The default configuration is enabled (uncommented). If you comment out that line it will still allow anonymous login. As it says in the default .conf file:

                            # Allow anonymous FTP? (Beware - allowed by default if you comment this out).
                            anonymous_enable=YES


                            Sounds kind of weird but I suppose that's the way they coded it.

                            Comment


                              #15
                              Re: FTP Question - How To Setup Vsftpd With A Username And Password

                              Originally posted by nejode

                              By the way, as Nate says, I too prefer ssh to connect to my remote server or desktop, you can do anything to your remote box, even reboot or shutdown, and even mount locally a remote ssh directory... very cool!

                              I'm going to take down my home ftp mini-server the next week or so to put in something better (it's a Celeron 366 with 128 mb of ram and 3 gb of hard disk)... although people say you can't run Linux on that hardware . In the meanwhile, I'll upload my vsftpd.conf file for anonymous-local login to the server if you want to take a look at it... but don't expect to much download speed: ftp://nejode.myftp.org:2021
                              Great news (for me anyway) - I downloaded OpenSSH installed the server. I fired up Filezilla and BAM! It connected on the first try! Using my login/password I can access to all my files. So, for now at least, my ftp problem has been solved by using OpenSSH which has it's own secure ftp server (sftp).

                              sudo make me rich<br /><br />Kubuntu Gutsy 7.10<br />KDE 3.5<br />Compaq Presario 5000<br />Intel Celeron 1.2 Ghz<br />512 Ram, Riva TNT2 Video Card<br />All the above hardware is 7 year old junk but<br />Linux runs great on it.&nbsp; :&gt<br />Ham Radio Rules

                              Comment

                              Working...
                              X