|
-
May 28th, 2008, 11:31 AM
#1
Access to a non local directory from a windows service (C/C++)
Hi,
Executed from a normal program
open("\\111.111.111.111\xyz",....
is working corectly.
But the same code executed in a windows service (system account) fails.
(Errno delieveres EACCES).
Have had anybody the same problem (and the solution) ?
Thanks
-
May 28th, 2008, 12:31 PM
#2
Re: Access to a non local directory from a windows service (C/C++)
I'm not security guru - but I believe you'll need to do some sort of "client impersonation".
http://msdn.microsoft.com/en-us/libr...90(VS.85).aspx
gg
-
May 29th, 2008, 04:41 AM
#3
Re: Access to a non local directory from a windows service (C/C++)
But the same code executed in a windows service (system account) fails.
(Errno delieveres EACCES).
No surprise, since Win2000 the LocalSystem account is deprived of network access. And the solution might be the mentioned client impersonation (or the service running some user account allowed to access that shared folder).
But, you know what, accessing network files from service always seemed to me a sort of bad design. The enterprise-level data belong in database.
Best regards,
Igor
-
May 29th, 2008, 06:26 AM
#4
Re: Access to a non local directory from a windows service (C/C++)
@Igor, Codeplug
Thanks for your help
-
June 2nd, 2008, 09:30 AM
#5
Re: Access to a non local directory from a windows service (C/C++)
a share marked as "null session share" might even be accessed by a service ...
regards
HoM
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|