471,321 Members | 1,900 Online
Bytes | Software Development & Data Engineering Community
Post +

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 471,321 software developers and data experts.

Get file owner in Windows

Don't know if it's still usefull but

it seems that you have to get the sid from a "give sid function"

import win32security,pywintypes
filo = win32security.GetFileSecurity(path,
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
Jul 23 '07 #1
0 1423

This discussion thread is closed

Replies have been disabled for this discussion.

Similar topics

reply views Thread by Brian Henry | last post: by
reply views Thread by Brian Henry | last post: by
5 posts views Thread by benyod79 | last post: by
6 posts views Thread by kai rosenthal | last post: by
2 posts views Thread by levimc | last post: by

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.