我用过pip3 install pyftpdlib
,它似乎安装正确。
当我运行python3 -m pyftpdlib -p 21
输出看起来像:
Traceback (most recent call last):
File "/usr/lib/python3.7/runpy.py", line 193, in _run_module_as_main
"__main__", mod_spec)
File "/usr/lib/python3.7/runpy.py", line 85, in _run_code
exec(code, run_globals)
File "/home/kali/.local/lib/python3.7/site-packages/pyftpdlib/__main__.py", line 122, in <module>
main()
File "/home/kali/.local/lib/python3.7/site-packages/pyftpdlib/__main__.py", line 112, in main
ftpd = FTPServer((options.interface, options.port), FTPHandler)
File "/home/kali/.local/lib/python3.7/site-packages/pyftpdlib/servers.py", line 118, in __init__
self.bind_af_unspecified(address_or_socket)
File "/home/kali/.local/lib/python3.7/site-packages/pyftpdlib/ioloop.py", line 1018, in bind_af_unspecified
raise socket.error(err)
OSError: [Errno 13] Permission denied
我添加none /dev/shm tmpfs rw,nosuid,nodev,noexec 0 0
到fstab
文件中,但它什么也没做。
另外,我可能把它安装到了错误的地方。这对您来说是否正确:
kali@kali:~/.cache/pip/wheels/69/f8/37/059165ed5bf71d7d824ac4f792009823361e159a47f4469420$ ls
pyftpdlib-1.5.6-py3-none-any.whl
我尝试在 root 中运行并得到了这个:
root@kali:~# python3 -m pyftpdlib -p 21
/usr/bin/python3: No module named pyftpdlib