Archive for October, 2010

How to setup FTP Server for multiple users on Linux

.

Hi again

sorry for late in posting. be honest to you I am too busy to write and most of the times i miss what exactly I suppose to do here.I do apologize and I promise you to do all my best about being more serious  in writing here.

there are many open source FTPd  packages are available for Linux. the best one is proftpd due to its wide options which can help any network administrator to have an ability to control his/her servers. but really it has many options and I believe that for having a simple FTP server these options may be useless. but I will write about how to set up it in the future since many of System Administrator prefer to work with it. There is another package which is easy to install in addition of many options and features it has.And that is vsftpd. I want to tell you how can you install and configure it.

the first step is installing it on your Linux.

aptitude install vsftpd

ok its easy to do. but you have few another step to configure your ftp server.

Note: by default this package allows to the clients login with anonymous account. So if you dont want to let the users connect to your ftp-server anonymously, you should either change the path or disabling account.

you can have an access to your ftp server configuration file probably in this path :

vim /etc/vsftpd/vsftpd.conf

then for changing the anonymous login root directory find the below option anc set your prefered directory.

anon_root=/data/directory

Or for disabling anonymous access feature from your service just change the below line in your configuration file to no.

anonymous_enable=YES

now for enabling local users to have an access to the ftp server you should enable the following line.
local_enable=YES

as I remember it should be enabled by default. just check it.

your ftp is simply working and everyone in your Linux automatically can connect to the ftp server and have an access to their home folder . but if you want to give them another folder just you can add them with an extra option.

useradd -d /home/ftp-docs user1

then you should give a permission to that user for the folder. it can be run by chown or chmod.

Thats it. I think this is the simplest way of installing and configuring FTP server for Multiple user so that each one has different root folder. it can be useful if you have virtual directories in your web server and want to set each directory to the specific user. perhaps its useful. but I highly recommend you to wait for me becuase I will write about proftpd and its options.

and eventually if you have any question please do not hesitate to ask me by email. I receive many mails each days and I try to reply them. but honestly it gives a time. :)

Regards


     Copyrighted Mehdi Behamin , All Rights Reserved
    
Blog has been visited 186956 times