set file permission on windows
kyosohma at gmail.com
Tue Apr 8 19:33:40 CEST 2008
On Apr 8, 12:03 pm, "Tim Arnold" <tim.arn... at sas.com> wrote:
> hi, I need to set file permissions on some directory trees in windows using
> When I click on properties for a file and select the 'Security' tab, I see a
> list of known 'Group or user names' with permissions for each entry such as
> Full Control, Modify, Read&Execute, etc.
> I need to (for example) periodically set Group Permissions for one group to
> Read, and another Group to None. I need to apply the settings to several
> directory trees recursively.
> If this was on Unix, I'd just use os.stat I guess. I don't think that will
> work in this case since all I know is the Group names and the permissions I
> need to allow.
> thanks for any pointers,
> --Tim Arnold
According to the following thread, you can use os.chmod on Windows:
You can also do it with the PyWin32 package. Tim Golden talks about
one way to do it here:
Also see the following thread:
Hope that helps!
More information about the Python-list