Powershell로 작성된 NamedPipe Server와 Python으로 작성된 NamedPipe Client가 있습니다.IOError : [Errno 13] Python NamedPipe에서 읽는 동안 권한이 거부되었습니다.
def namedpipeClient():
print "Inside NamedPipeClient"
time.sleep(2)
f = open(r'\\x.x.x.x\pipe\testpipe', 'r+b', 0)
i = 1
n = struct.unpack('I', f.read(4))[0] # Read str length
s = f.read(n) # Read str
f.seek(0) # Important!!!
f.close()
print 'Read:', s
if (s is None):
return True
else:
return False
내가 하나의 시스템에서 C 번호에 NamedPipeServer을 시작하고, 다른 컴퓨터에서 나는 배치 파일을 통해 NamedPipeClient 실행됩니다 : 다음은 내 명명 된 파이프 클라이언트입니다. 다음은 내 배치 파일 runTest.bat입니다.
c:
cd \Python27
.\python D:\LoadTesting\SikuliNPClient.py
이 방법을 사용하면 아무런 문제없이 모든 것을 실행합니다. 지금 같은 시스템이 아니라 원격으로 내가 PsExec를 통해 NamedPipeServer를 시작하고 기계에서 같은 배치 파일을 실행하려고하면
, psexec \\$remoteMachine -i 0 -d Powershell D:\LoadTesting\runTest.bat
배치 파일이 실행됩니다,하지만 f = open(r'\\x.x.x.x\pipe\testpipe', 'r+b', 0)
문에, 그것은을 던졌습니다 다음 오류.
Inside NamedPipeClient
Traceback (most recent call last):
File "D:\LoadTesting\SikuliNPClient.py", line 40, in <module>
namedpipeClient()
File "D:\LoadTesting\SikuliNPClient.py", line 9, in namedpipeClient
f = open(r'\\192.168.173.231\pipe\testpipe', 'r+b', 0)
IOError: [Errno 13] Permission denied: '\\\\x.x.x.x\\pipe\\testpipe'
두 명의 컴퓨터가 관리자 권한을 가진 동일한 사용자로 로그인되어 있습니다. 문제를 해결하는 데 도움이되도록 도와주세요. 사전에
감사합니다!