python调用ftp.cwd('xx/xx') 产生错误:550 Failed to change directoryd的解决方法
来源:互联网 发布:246好百姓天下彩网域名 编辑:程序博客网 时间:2024/05/18 01:29
vsftpd运行在Ubuntu,ftp根目录为/home/ftpdir, 根目录下有个一文件夹get,程序运行ftp.cwd(‘get’)报错:550 Failed to change directory
解决方法:
1. sudo gedit /etc/vsftpd.conf
增加:local_root=/home/ftpdir
以下三句去掉#
chroot_local_user=YES
chroot_list_enable=YES
chroot_list_file=/etc/vsftpd.chroot_list
保存
2.sudo gedit /etc/vsftpd.chroot_list
增加ftp的用户名(一行一个ftp用户名)
保存
3.sudo chmod 777 /home/ftpdir
sudo chmod 777 /home/ftpdir/get
4.sudo service vsftpd restart
from ftplib import FTPftp = FTP()ftp.set_debuglevel(2)ftp.connect('192.168.0.118', 21, 30)ftp.login('uftdfdfp', '123df456')ftp.cwd('get')# do somethingftp.quit()
0 0
- python调用ftp.cwd('xx/xx') 产生错误:550 Failed to change directoryd的解决方法
- SQL Server子系统加载失败(The xx subsystem failed to load)错误的处理
- cocos2d-x发生undefined reference to `XX'错误 一劳永逸解决方法
- android.database.sqlite.SQLiteException: Failed to change locale for db '/storage/sdcard0/xx/xxx.db'
- Python中“xx+=xx”与“xx=xx+xx”的区别
- failed to read artifact descriptor for xx
- 使用git往github上提交代码时出现[packet_write_wait connection to xx.xx.xx.xx Broken pipe]错误的解决办法
- 使用Git往github上提交代码时出现[packet_write_wait connection to xx.xx.xx.xx Broken pipe]错误的解决办法:
- python xx.py文件点击完之后一闪而过的解决方法
- Failed to install xx.apk on device ''xxx“: timeout 解决方法大全!保证有条适合你。
- IntelliJ maven项目pom文件错误failed to read artifact descriptor for xx.jar问题解决办法
- XX
- xx
- xx
- xx
- XX
- xx
- xx
- JavaScript游戏之连连看连线算法实例
- FreeCodeCamp:Seek and Destroy
- 前端开发笔记(4)css基础(下)
- http://www.cnblogs.com/Lawson/archive/2012/07/31/2616623.html
- iOS开发之设置状态栏样式
- python调用ftp.cwd('xx/xx') 产生错误:550 Failed to change directoryd的解决方法
- POJ 1442Black Box(优先队列)
- 几篇文章让我理解了dns解析过程
- USACO 2.3 控制公司 (DFS)
- 11.24
- The underlying connection was closed: Could not establish trust relationship for the SSL/TLS secure
- Chrome浏览器显示“Adobe flash player已过期”问题之解决
- Linux和Windows平台文件编码问题
- Android之置顶提示警告信息的控件AlertDialog