Linux Help
guides forums blogs
Home Desktops Distributions ISO Images Logos Newbies Reviews Software Support & Resources Linuxhelp Wiki

Welcome Guest ( Log In | Register )



Advanced DNS Management
New ZoneEdit. New Managment.

FREE DNS Is Back

Sign Up Now
 
Closed TopicStart new topic
> CentOS 3.x, 4.x VSFTPD Ftp server, with local user login only
Robert83
post Jan 16 2006, 03:02 AM
Post #1


Its GNU/Linuxhelp.net
*******

Group: Support Specialist
Posts: 1,439
Joined: 3-January 04
From: Germany
Member No.: 2,069



Hello Everyone,

This one is going to be a CentOS 3.x,CentOS 4.x vsftpd guide.

First you need to download CentOS 3.x CD1 or CentOS 4.x CD1 from www.centos.org.

Then once the computer is installed you do the

CODE
yum update


Once the update has successfully finished, you issue the following command

CODE
yum install vsftpd


Using your favorite text editor or using vi (your choice) you create a new vsftpd.conf file.
First you backup the old one like this.
CODE
cd /etc/vsftpd
mkdir backup
mv vsftd.conf backup/vsftpd.conf
vi vsftpd.conf


and add the following lines to the vsftpd.conf file

CODE
chown_uploads=NO
xferlog_enable=YES
idle_session_timeout=600
data_connection_timeout=120
ascii_upload_enable=NO
ascii_download_enable=NO
background=YES
listen=YES
ls_recurse_enable=NO
chroot_local_user=YES
write_enable=YES

anonymous_enable=NO
anon_upload_enable=NO
anon_mkdir_write_enable=NO

userlist_enable=YES
userlist_deny=YES
local_enable=YES
pam_service_name=vsftpd


the file vsftpd.user_list should contain atleast the following users
root,bin,daemon,adm,lp,sync,shutdown,halt,mail,news,uucp,operator,games,nobody ...
you may need to manually add some users if you install new services for example squid , etc...

next comes the add user part

CODE
useradd myftpusername
passwd myftpusername


then using your favorite text editor or with vi edit your /etc/passwd file like this
WRONG:
CODE
myftpusername:x:501:501::/home/myftpusername:/bin/bash

CORRECT
CODE
myftpusername:x:501:501::/home/myftpusername:/sbin/nologin


You will need to do this for each user you add and wish to use to access the ftp server.

Now all that is left, make sure vsftpd starts up by default
CODE
chkconfig vsftpd on
/etc/init.d/vsftpd start


Login with your test username , and that is all.

NOTE : each user will only be able to see it's own /home/username directory , and wont be able to get outside of that.

Sincerely
Robert B


--------------------
Robert Becskei
robert83@linuxhelp.net
--------------------
May the source be with us!
--------------------
AMD X2-3800 @ 2400Mhz
2048MB DDR 400Mhz
DFI Lanparty UT4 NF4 ULTRA-D
GeForce 7800GT
250GB+250GB
Pioneer DVD-RW
17inch Samsung Syncmaster 757NF
WinXP Pro (SP2)/ CentOS 4.3
--------------------
Go to the top of the page
 
+Quote Post

Closed TopicStart new topic
1 User(s) are reading this topic (1 Guests and 0 Anonymous Users)
0 Members:

 



RSS Lo-Fi Version Time is now: 18th October 2017 - 11:42 AM