/etc/vsftpd/vsftpd.conf 파일에 일반적으로 설정값을 적용하게되는데
일반유저만 따로 설정을 할수 있는 방법은 아래와 같습니다.
VsFTPD With Multiple Users Home dir with different permission
#yum install vsftpd* //for install the FTP Server packege
#vim /etc/vsftpd/vsftpd.conf //Mention below screen shoot entry in vsftpd.conf file anonymous_enable=NO //Disable anonymous user local_enable=YES //Enable local user for login chroot_local_user=YES //for not shown user home dir path user_config_dir=/etc/vsftpd/vsftpd-virtual-user/ //virtual user config dir virtual_use_local_privs=YES //use local user as a virtual user dual_log_enable=YES //For enable dual log /var/log/vsftpd.log connect_from_port_20=YES //FTP port no listen=YES //Read port no. pam_service_name=vsftpd //PAM Authentication enable tcp_wrappers=YES //TCP warapper enable For Change FTP Port listen_port=27 //Add this line in vsftpd.conf file for port change How to use Passive FTP If you use FTP server in Passive Mode, Please enter these below line's in vsftpd.conf file pasv_enable=yes //Enable FTP Server to Passive Mode pasv_max_port=55000 //Passive FTP Maximum DATA port pasv_min_port=50000 //Passive FTP Minimum DATA port port_enable=YES //Enable Passive FTP DATA port pasv_address=54.251.136.7 //Public ip of machine where ftp server is running Create Dir for Virtual User in Vsftpd Root Dir #mkdir /etc/vsftpd/vsftpd-virtual-user/ #cd /etc/vsftpd/vsftpd-virtual-user/ #vim vsftpd_user //enter your virtual user name and save vivek //virtual user
Then create your virtual username file like vivek and kamal for special permission and set local_rootkamal //virtual user #vim /etc/vsftpd/vsftpd-virtual-user/ vivek and #vim /etc/vsftpd/vsftpd-virtual-user/kamal local_root=/home/kamal //Virtual user HOME dir cmds_allowed=USER,PASS,SYST,FEAT,OPTS,PWD,TYPE,PASV,LIST,STOR,CWD,MKD,SIZE,MDTM,CDUP,RETR,RNFR,RNTO //Allow FTP CMD in this virtual user local_umask=022 //SET umask value for virtual user write_enable=YES //Write Enable for virtual userIf you want to set All users login to one dir then enter line in vsftpd.conf file “ local_root=/your/dir/path” ANDIf you want to set All users login to own home dir then no need to mention “ local_root=/your/dir/path” entry in any file ANDIf you want to set only a users login to other dir (like kamal’s home dir is /data/k but you want set, its login on /home/kamal) then enter line in specific virtual user file /etc/vsftpd/vsftpd-virtual-user/kamal file “ local_root=/home/kamal” Set Pam Authentication in vsftpd# vim /etc/pam.d/vsftpd #service vsftpd start If disable Any FTP user Account Please Enter username in "#vim /etc/vsftpd/ftpusers" all FTP commands and save it on the system for reference: FINISHED
|
도움이 되셨다면 공감과 댓글 부탁 드립니다. *^.^*
'Linux' 카테고리의 다른 글
sas controller disk 교체 방법 (0) | 2014.09.15 |
---|---|
max open files, max process 설정 값 변경 (0) | 2014.08.11 |
Dell 서버 Array 체크 rpm (0) | 2014.04.08 |
[LINUX] hpacucli 온라인 raid 재구성 (0) | 2013.05.08 |
[LINUX] 500 OOPS: cannot change directory 에러 발생시 (0) | 2013.05.07 |