使用ftp从Linux中下载文件时报550 Filed to open file

  1. 在Linux中使用命令getsebool -a|grep ftp 查看ftp的相关权限
  2. 这个时候会报SElinux is disabled(因为在装vsftpd的时候讲SElinux=disabled)
  3. Vim /etc/sysconfig/selinux讲SElinux=disabled 改为SElinux=enforcing
  4. 使用ftp从Linux中下载文件时报550 Filed to open file
  5. 这个时候再输入命令getsebool -a|grep ftp时就不会报错
  6. 使用命令setsebool -P ftp_home_dir=1即将ftp_home_dir由off 改成on
  7. 使用ftp从Linux中下载文件时报550 Filed to open file
  8. 然后再用ftp进行文件下载(这个时候还是提示550)
  9. 查看要下载文件的权限ls -l
  10. 更改要下载文件的所有者和权限
  11. 使用ftp从Linux中下载文件时报550 Filed to open file
  12. 然后再用ftp去下载,这个时候可以看到是下载成功的