Reading the access attributes of directories in Windows
Thomas Jollans
thomas at jollybox.de
Thu Aug 19 18:04:29 EDT 2010
On Thursday 19 August 2010, it occurred to Tim Golden to exclaim:
> On 19/08/2010 4:55 PM, vsoler wrote:
> > I've been looking in the "os" library, and found the "os.chmod" method
> > but I am not sure that it is going to give me what I need. Should I
> > also used library "stat"?
>
> No. Both of these are basically doing a best-endeavours job of mapping
> certain Windows attributes to some Posix equivalent. They're essentially
> useless for anything beyond the most trivial tasks.
This brings up an interesting, but probably quite complicated question: is it
reasonable to try to express Windows permissions using full POSIX ACLs (not
the traditional UNIX mode, the full-featured complex beast that most users
know nothing about and that many file systems don't enable by default) -- or
is it, maybe, possible to express the Windows permissions model as a subset of
POSIX ACL?
I'm no expert either, but the basic idea is that you replace the traditional
UNIX model with one where not only does every file have an owner and an owning
group, and r/w/x permission bits for owner, group, and "the rest", but you can
also specify permissions for arbitrary users and groups, in addition to the
standard set. I'm leaving out all the details, of course, first and foremost
those I don't know about myself, but that's essentially it.
Do Windows NT permissions do anything more? Or, apart from the "executable"
bit, anything less, for that matter?
Just asking. Maybe there are some experts around.
- Thomas
More information about the Python-list
mailing list