User Tools

Site Tools


vsftpd_centos

Differences

This shows you the differences between two versions of the page.

Link to this comparison view

Next revision
Previous revision
vsftpd_centos [2015/04/25 21:33] – created luke7858vsftpd_centos [2024/05/23 07:26] (current) – external edit 127.0.0.1
Line 6: Line 6:
 === Configuring /etc/vsftpd/vsftpd.conf === === Configuring /etc/vsftpd/vsftpd.conf ===
  
-You should edit your **/etc/vsftpd/vsftpf.conf** file similar to the following:+You should edit your **/etc/vsftpd/vsftpd.conf** file similar to the following:
 <sxh bash> <sxh bash>
 anonymous_enable=NO anonymous_enable=NO
Line 24: Line 24:
 pasv_max_port=65000 pasv_max_port=65000
 </sxh> </sxh>
 +\\
 === Chrooting User === === Chrooting User ===
  
-If you would like to chroot the users you can add the following line to the bottom of **/var/vsftpd/vsftpd.conf**+If you would like to chroot the users you can add the following line to the bottom of **/etc/vsftpd/vsftpd.conf**
  
 #for chrooting users add the following lines: #for chrooting users add the following lines:
Line 47: Line 47:
 </sxh> </sxh>
  
 +\\
 === Firewall Rules: === === Firewall Rules: ===
 <sxh bash> <sxh bash>
-iptables -I INPUT -p tcp dport 21 -m comment comment FTP” -j ACCEPT+iptables -I INPUT -p tcp --dport 21 -m comment --comment "FTP-j ACCEPT
  
-iptables -I INPUT -p tcp -m multiport dports 60000:65000 -m comment comment FTP passive mode ports” -j ACCEPT+iptables -I INPUT -p tcp -m multiport --dports 60000:65000 -m comment --comment "FTP passive mode ports-j ACCEPT
 </sxh> </sxh>
 <sxh bash> <sxh bash>
Line 61: Line 61:
 IPTABLES_MODULES="nf_conntrack_ftp" IPTABLES_MODULES="nf_conntrack_ftp"
 </sxh> </sxh>
-Adding and modifying Users+\\ 
 +=== Adding and modifying Users===
  
-useradd -m -s /sbin/nologin username will create a user without the access to ssh into the server which is more secure if the user is only being used for FTP (they will still be able to user FTP + vsFTPd, NOT sFTP)+**useradd -m -s /sbin/nologin username** will create a user without the access to ssh into the server which is more secure if the user is only being used for FTP (they will still be able to user FTP + vsFTPd, NOT sFTP)
  
-useradd –home /home/directory/ username this adds a user with a specific home directory. This is good for chrooting a user to a specific directory.+**useradd –/home/directory/ username** this adds a user with a specific home directory. This is good for chrooting a user to a specific directory.
  
-Adding a new user straight into a group useradd -G {group-name} username+Adding a new user straight into a group **useradd -G {group-name} username**
  
 Alternivately you are able to use the following command to add a new user straight into a group you have created with a home directory of /var/www/html and NO shell login (only useable as FTP user) Alternivately you are able to use the following command to add a new user straight into a group you have created with a home directory of /var/www/html and NO shell login (only useable as FTP user)
- +<sxh bash> 
-useradd -G groupname home /var/www/testftp/ -m -s /sbin/nologin newusername +useradd -G groupname -home /var/www/testftp/ -m -s /sbin/nologin newusername 
 +</sxh>
 Don’t forget to set the password for the user with: Don’t forget to set the password for the user with:
 +<sxh bash>
 passwd username passwd username
 +</sxh>
 you will then be prompted to change the password for the user you will then be prompted to change the password for the user
vsftpd_centos.1429997636.txt.gz · Last modified: 2024/05/23 07:26 (external edit)

Except where otherwise noted, content on this wiki is licensed under the following license: Public Domain
Public Domain Donate Powered by PHP Valid HTML5 Valid CSS Driven by DokuWiki