Server Fault is a question and answer site for system and network administrators. It's 100% free, no registration required.

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

I have a virtual server running CentOS, and need to create an FTP user to give to a client so they can upload some files to me.

Any idea how I go about this, and how I only give them access to upload from one folder? (I don't care what folder, as long as they do not get access to my other files.)


share|improve this question

Here are the basics

Create a local user account for your client give it a password and home directory etc.

Install vsftpd

yum install vsftpd




save the file and exit then restart vsftpd

/sbin/service vsftpd restart

and ensure it runs when the system starts

/sbin/chkconfig vsftpd on

Edit /etc/sysconfig/iptables-config

ensure that there is an entry for IPTABLES_MODULES which amongst other things contains ip_conntrack_ftp e.g.


Then modify the firewall

/sbin/service iptables save

edit /etc/sysconfig/iptables

After the line

:RH-Firewall-1-Input - [0:0] or similar ( the [0:0] may be different) add

-A RH-Firewall-1-INPUT -m state --state NEW -p tcp --dport 21 -j ACCEPT

save the file and exit then restart the firewall

/sbin/service iptables restart

You sould be good to go.

share|improve this answer

Consider setting up an SFTP server with OpenSSH and a chrooted home directory for your user(s). Benefits: key pair authentication (so you can disable password authentication), you don't need (or they don't need) to open any additional ports beyond TCP 22, end-to-end encryption, and with a chrooted home directory, they're "jailed" within their chrooted home directory only and have no access outside of that directory.

share|improve this answer

Your Answer


By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.