You are not writing to a home directory, you are writing to /full/path/of/file.txt:myfile = '/full/path/of/file.txt'...f.storbinary('STOR ' + myfile, o)您只需在 STOR 命令中使用文件名(一旦"cwd"已经是正确的目标路径):You have to use a file name only with the STOR command (once the "cwd" is already the correct target path):f.cwd('/home/user/some/dir/')f.storbinary('STOR file.txt', o)或远程主机的正确绝对路径:or a correct absolute path for the remote host:f.storbinary('STOR /home/user/some/dir/file.txt', o) 这篇关于ftplib.error_perm:553无法创建文件.(Python 2.4.4)的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持! 10-14 18:36