linux中安装ftp 出现错误OOPS: cannot change directory: **

当我们安装好ftp时,ftp首先会积极拒绝我们访问。

这是因为我们linux的安全机制限制,只需要关闭我们的防火墙即可。

linux系统默认情况有开启防火墙,这样就会阻止外部用户访问ftp服务器。

关闭linux系统防火墙(执行指令 >setup  )

防火墙后边综括号的*”通过敲空格去除,表示关闭防火墙


关闭防火墙之后,通常还会遇见一个   

 出现错误OOPS: cannot change directory: **


出现这个错误是是提示我们不能够链接服务器。

解决:关闭SELinux(secure enhanced linux安全增强型linux)

> vi /etc/selinux/config     完成编辑并reboot重启系统,并启动ftp服务

selinux: secure enhanced linux 安全增强型linux,对系统起着安全保护作用。对软件安装使用会有干扰作用。对使用ftp服务也有干扰作用。

编辑/etc/selinux/config,把enforcing改为disabled:


我们再重新启动ftp即可





猜你喜欢

转载自blog.csdn.net/coreyc/article/details/79040874