Velocity Reviews - Computer Hardware Reviews

Velocity Reviews > Newsgroups > Programming > Python > RE: file() and Win32 security attributes

Reply
Thread Tools

RE: file() and Win32 security attributes

 
 
Tim Golden
Guest
Posts: n/a
 
      02-27-2004
GK> how can I force file() to create files that
GK> have "ALL ACCESS FOR EVERYONE" security attributes? Other than by a
GK> major rewrite of my existing code modules replacing the existing
GK> "native-python" code by win32file / win32security calls?

In short, I don't believe you can (other than reworking the necessary
Python module source and rebuilding...). However (and I'm not an NT
security guru by any means) I think you can up permissions so that the
files in a directory inherit the folder's permissions. This won't of
course help you if you want to create files in arbitrary directories.

>In case you're wondering what is happening here:
>
>- user A with admin rights logs on to NT and uses python to create a
>file
>- user A logs off
>- user B without admin rights logs on to NT and uses python to access
>said file -> doesn't work, because B has no admin rights and cannot
>access files created by an administrator.


Strictly, it doesn't matter who the file is created by, but rather
what permissions it acquires during its creation. (The ownership
might matter as a tie-breaker but I'm not sure what happens if an
administrator removes my permissions on a file which I own).

I do have a rough-edged nt_security module (based on the win32all/pywin32
stuff)
which does something to simplify ACL maintenance. If you're interested, let
me
know.

TJG

__________________________________________________ ______________________
This e-mail has been scanned for all viruses by Star Internet. The
service is powered by MessageLabs. For more information on a proactive
anti-virus service working around the clock, around the globe, visit:
http://www.star.net.uk
__________________________________________________ ______________________

 
Reply With Quote
 
 
 
Reply

Thread Tools

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
attributes ala java annotations or .Net attributes? Kyle Schmitt Ruby 3 07-24-2007 07:48 PM
class attributes & data attributes james_027 Python 2 06-20-2007 03:12 PM
WebControl.Attributes.Add and custom attributes P4trykx ASP .Net 2 01-31-2007 04:33 PM
Parse reserved attributes as normal attributes Max XML 1 09-22-2006 12:04 PM
file() and Win32 security attributes Gerson Kurz Python 8 02-29-2004 05:33 PM



Advertisments