[python-win32] Getting file security access info on network
Thibault Ketterer
thekit at gmail.com
Mon Jul 23 09:59:02 CEST 2007
it works for me with this code
import win32security,pywintypes
try:
filo = win32security.GetFileSecurity(path,
win32security.OWNER_SECURITY_INFORMATION)
sid = filo.GetSecurityDescriptorOwner()
account, domain, typecode =
win32security.LookupAccountSid(None, sid)
except pywintypes.error,details:
account = domain = ""
errcode = details[0]
print "error acces:", path
print domain + u'\\' + account
--
Thibault ketterer
More information about the Python-win32
mailing list