Centos开启FTP(vsftpd)服务
#chkconfig vsftpd on //开机自【kāi jī zì】启动【qǐ dòng】vsftpd服务【fú wù】🙆
#/etc/init.d/vsftpd start //开启vsftpd服务【fú wù】🙆
#vi /etc/vsftpd/vsftpd.conf //编辑【biān jí】vsftp配置文件🍷
找到下面这个🎫并禁用:
anonymous_enable=NO //禁用匿名用户登陆🔯
再添加一行:
local_enable=YES //开启本【kāi qǐ běn】🈵地用户登陆🔯
建立用👫户【hù】:
#adduser -d /var/ftp/test -g ftp -s /sbin/nologin test
#passwd test
iptables防火墙💆设置【shè zhì】:
#system-config-securitylevel
在定制里面把【lǐ miàn bǎ】ftp选择上🦊。
#/etc/init.d/iptables restart //重启一🤫下【xià】iptables
修改iptables之后,就可以【jiù kě yǐ】🚁访问ftp了,但用户【dàn yòng hù】不能登陆⛵,原因就是【shì】🚫selinux需要关🐪闭【bì】。
#vi /etc/sysconfig/selinux
找到【zhǎo dào】:
SELINUX=enforcing
修改为🙁:
SELINUX=disabled
#reboot //重启电脑
//如果登🚦陆之后【lù zhī hòu】不能写入,请把目【qǐng bǎ mù】录权限再修改🖍一下【yī xià】⏩:
#chown test /var/test
关键词【guān jiàn cí】🌆:Centos,FTP,vsftpd
阅读本文后您有什么感想? 已有 人给出评价!
- 0
- 0
- 0
- 0
- 0
- 0