Take the 2-minute tour ×
Server Fault is a question and answer site for professional system and network administrators. It's 100% free, no registration required.

Possible Duplicate:
set up single directory ftp access for customer on Ubuntu

I have installed Ubuntu 10.04 server in my server for the ftp configration

i want to configure in such a way that if i create a user in ftp user should not see any other content

Please let me know for the configration

Thanks in advance sridhar

share|improve this question
1  
Please add more information to your question. For example, what FTP Server software are you using? What have you tried so far? –  MichelZ Jul 23 '12 at 12:01
add comment

marked as duplicate by Chris S Jul 23 '12 at 12:48

This question has been asked before and already has an answer. If those answers do not fully address your question, please ask a new question.

1 Answer

Install vsftpd

apt-get install vsftpd

First, be sure to open ports 35000:36000 on the firewall to permit PASV FTP.

Then for your /etc/vsftpd.conf

listen=YES
anonymous_enable=NO
local_enable=YES
local_umask=022
dirmessage_enable=YES
xferlog_enable=YES
connect_from_port_20=YES
hide_ids=YES
use_localtime=YES
nopriv_user=ftp
chroot_local_user=YES
secure_chroot_dir=/var/run/vsftpd
pam_service_name=vsftpd
guest_enable=YES
guest_username=ftp
user_config_dir=/etc/vsftpd_user_conf
ftpd_banner=My FTP Server
virtual_use_local_privs=YES
anon_upload_enable=NO
async_abor_enable=YES
pasv_min_port=35000
pasv_max_port=36000
pasv_enable=YES
port_enable=YES
write_enable=NO

Then to create a user, run,

/bin/htpasswd /etc/ftpd.passwd myusername

Then create the accompanying file in /etc/vsftpd_user_conf/myusername

guest_username=myuser
local_root=/home/myuser
write_enable=yes

The user connects as the guest_username stated, so it allows you to have multiple FTP users with different access, but all the while, preserving important file-level owner permissions.

That will give you a nice simple, chrooted, secure, isolated and manageable FTP configuration.

You're welcome.

share|improve this answer
    
Hi Sonassi Thanks for the information –  shreedhar.bh Jul 27 '12 at 4:49
    
Hi but i am using pure ftp in ubuntu server when i am using with same networking its working fine. i want to access through the DNS but its not connecting. when i trying through Fire ftp its waiting for passive mode –  shreedhar.bh Jul 27 '12 at 4:57
add comment

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