我正在尝试使用结构 python 运行 put 命令。它在 Windows 服务器上不起作用。
但它在 linux 服务器上运行良好。我正在使用织物版本 1.4.1。
代码是:
def run_windows(local_path="C:\python27\dist",remote_path="\tmp"):
put(local_path,remote_path)
以下是错误消息:
Fatal error: put() encountered an exception while uploading 'C:\python27\dist'
Traceback (most recent call last):
File "C:\Python27\lib\site-packages\fabric-1.4.1-py2.7.egg\fabric\operations.p
y", line 383, in put
mirror_local_mode, mode)
File "C:\Python27\lib\site-packages\fabric-1.4.1-py2.7.egg\fabric\sftp.py", li
ne 265, in put_dir
self.mkdir(rcontext, use_sudo)
File "C:\Python27\lib\site-packages\fabric-1.4.1-py2.7.egg\fabric\sftp.py", li
ne 101, in mkdir`enter code here`
self.ftp.mkdir(path)
File "build\bdist.win32\egg\ssh\sftp_client.py", line 303, in mkdir
self._request(CMD_MKDIR, path, attr)
File "build\bdist.win32\egg\ssh\sftp_client.py", line 635, in _request
return self._read_response(num)
File "build\bdist.win32\egg\ssh\sftp_client.py", line 682, in _read_response
self._convert_status(msg)
File "build\bdist.win32\egg\ssh\sftp_client.py", line 710, in _convert_status
raise IOError(errno.EACCES, text)
IOError: [Errno 13] Permission denied"
command:fab -c env.fabricrc run_windows:hosts="1.2.2.3"
日志也在服务器端生成:
2-02-2012 19:48:00 IP 1.6.15.1 administrator is making C:\Testing/\dist (C:\Program Files (x86)\freeSSHd\C:\Testing\dist\\dist)
可能是什么问题?