set file permission on windows

Tim Arnold tim.arnold at sas.com
Wed Apr 9 19:03:06 CEST 2008


"Tim Golden" <mail at timgolden.me.uk> wrote in message 
news:mailman.59.1207681890.17997.python-list at python.org...
> Tim Arnold wrote:
>> "Mike Driscoll" <kyosohma at gmail.com> wrote in message 
>> news:7d75fc7b-a2b7-4ca2-b386-27da975043d0 at m44g2000hsc.googlegroups.com...
>>> On Apr 8, 12:03 pm, "Tim Arnold" <tim.arn... at sas.com> wrote:
>>>>    <snip>
>>
>>> According to the following thread, you can use os.chmod on Windows:
>>>
>>> http://mail.python.org/pipermail/python-list/2003-June/210268.html
>>>
>>> You can also do it with the PyWin32 package. Tim Golden talks about
>>> one way to do it here:
>>>
>>> http://timgolden.me.uk/python/win32_how_do_i/add-security-to-a-file.html
>>>
>>> Also see the following thread:
>>>
>>> http://mail.python.org/pipermail/python-win32/2004-July/002102.html
>>>
>>> or
>>>
>>> http://bytes.com/forum/thread560518.html
>>>
>>> Hope that helps!
>>>
>>> Mike
>>
>> Hi Mike,
>> It does help indeed, especially the last two links.
>
> Hi, Tim. For the purposes of improving that page of mine linked
> above, would you mind highlighting what made it less useful
> than the last two links? On the surface, it seems to match your
> use case pretty closely. Was there too much information? Too
> little? Poor formatting? Just didn't feel right? I've a small set
> of security-related pages in train and I'd rather produce something which 
> people find useful.
>
> Thanks
>
> TJG

Hi TJG. Thanks for the site. Unfortunately, I mis-typed in the previous 
reply and that should have been the 'first two links' instead of 'last two 
links'. In fact I bookmarked your site so I can re-read the material and I 
copied the code to play around with.  Excellent example--it contains just 
what I needed to know, esp. since it replaces the dacl instead of modifying 
one. Now I can remove access for 'Everybody' by simply not including it in 
the new dacl.

thanks!
--Tim Arnold





More information about the Python-list mailing list