Linux Create An FTP User Account

last updated in Categories CentOS, File system, Howto, Linux, RedHat/Fedora Linux

Now your FTP server is up and running. It is time to add additional users to FTP server so that they can login into account to upload / download files. To add a user called tom and set the password, enter:
# adduser -c 'FTP USER Tom' -m tom
# passwd tom

Now tom can login using our ftp server. Make sure the following is set in vsftpd.conf

ADVERTISEMENTS

local_enable=YES

Restart the vftpd:
# service vsftpd restart

However, I recommend setting virtual FTP user account to increase server security.

Posted by: Vivek Gite

The author is the creator of nixCraft and a seasoned sysadmin, DevOps engineer, and a trainer for the Linux operating system/Unix shell scripting. Get the latest tutorials on SysAdmin, Linux/Unix and open source topics via RSS/XML feed or weekly email newsletter.


ADVERTISEMENTS

14 comment

  1. These instructions seem to get the server running, but I’m unable to connect with any local user. It keeps telling me my password is invalid, even though I can ssh with that username/password just fine.

    Status: Connection established, waiting for welcome message…
    Response: 220 (vsFTPd 2.0.5)
    Command: USER ftpuser
    Response: 331 Please specify the password.
    Command: PASS ********
    Response: 530 Login incorrect.

    1. For a new user you would do:

      # useradd -m -G ftp -s /sbin/nologin -d /home/ftpuser ftpuser

      (This also sets the login shell to /sbin/nologin which effectively disables ssh login for the account.)
      For an existing user you would do:

      # usermod ftpuser -G ftp -s /sbin/nologin -d /home/ftpuser

  2. Using the pam file and virtual users with SSL/TLS, would i have to use the user_config_dir= option to set specifics for those users so they have seperate login directories, since those users aren’t in the centos users account, but in the separate pam database file?

  3. it wont let me upload anything, i am using filezilla, it says error 553 could not create file and 550 could not change directory

  4. this is the usual ‘type it in’ and hope for the best.
    surely a gui os like suse should at least have a simple gui to add authenticated ftp users

  5. hi i want to know on
    1. On a network how we can create a ftp server and group
    and
    2.How we can allocate (provide) specific space for sftp server .

  6. hi i want to know on
    1. On a network how we can create a ftp server and group
    and
    2.How we can allocate (provide) specific space for sftp server .

Leave a Comment