470,810 Members | 865 Online
Bytes | Developer Community
New Post

Home Posts Topics Members FAQ

Post your question to a community of 470,810 developers. It's quick & easy.

Win98 - exceptions.IOError: (13, 'Permission denied')

Hi to everyone,

I have a Service, that runs on a WinXP machine. The service read a file
on a Win98 machine and write the content in a file on the WinXP machine.
After tree times I get the error message exceptions.IOError: (13,
'Permission denied').

The following things I have already tested:

- The file on Win98 machine could be deleted, so the file is closed
- Stop an restart the service on WinXP, will have no effect
- Reboot the Win98 machine solve the problem for three times. So I have
the same issue explained above.
- I have changed the intervall from 5 sec to 1 minute. After ther first
time I get the error message.
- Using a Win2000 or WINXP machine instead of the Win98 machine. That
works. But unfortunatly the PC to access is a Win98 and I have no
influence to decide for upgrade.

I can't figure out, what's the problem.

This is the code to simulate my actual problem:

# -*- coding: iso-8859-1 -*-

import win32serviceutil
import win32service
import win32event
import pywintypes
import win32file
import win32pipe
import win32api
import win32con
import thread
import ntsecuritycon
import os
import sys

class MyService(win32serviceutil.ServiceFramework):
"""NT Service."""

_svc_name_ = "TCTest"
_svc_display_name_ = "TCTest"

def __init__(self, args):
win32serviceutil.ServiceFramework.__init__(self, args)
self.stop_event = win32event.CreateEvent(None, 0, 0, None)
self.overlapped = pywintypes.OVERLAPPED()
self.overlapped.hEvent = win32event.CreateEvent(None,0,0,None)
self.thread_handles = []

def SvcDoRun(self):
import servicemanager

(self._svc_name_, '')

while 1:
datei = open(r'\\ipcwin98\test\test.txt', 'r')
log = open(r'c:\log.txt', 'a')

if win32event.WaitForSingleObject(self.stop_event, 5000) ==

(self._svc_name_, '')

def SvcStop(self):
self.ReportServiceStatus(win32service.SERVICE_STOP _PENDING)

if __name__ == '__main__':
Thanks in advanced for your help.

Feb 9 '07 #1
0 1443

This discussion thread is closed

Replies have been disabled for this discussion.

Similar topics

2 posts views Thread by Taishi | last post: by
4 posts views Thread by zombek | last post: by
6 posts views Thread by Antoine De Groote | last post: by
reply views Thread by private.anders | last post: by
reply views Thread by private.anders | last post: by
reply views Thread by Simo D | last post: by
reply views Thread by Simo D | last post: by
reply views Thread by mihailmihai484 | last post: by
By using this site, you agree to our Privacy Policy and Terms of Use.