OT - file permission checks on Windows

Skip Montanaro skip at pobox.com
Mon Mar 4 15:32:12 EST 2002


    >> Is the permission model there even remotely similar to what I'm used
    >> to on Unix systems?

    Thomas> No, I don't think so.

I was afraid of that.

    >> I poked around posixmodule.c, but it makes next to no use of uids and
    >> gids.  As far as I can tell, Windows doesn't know about uid_t or
    >> gid_t, though it has a struct _stat type whose st_uid and st_gid
    >> fields are shorts, so I can work around the missing types.

    Thomas> st_uid and st_gid are always set zo zero under Win NT:
    Thomas> http://msdn.microsoft.com/library/en-us/vclib/html/_crt__stat.2c_._wstat.2c_._stati64.2c_._wstati64.asp

Thanks for the pointer.  This takes me someplace weird in the msdn website,
most likely because I'm using Opera instead of MSIE.  I'll have to fiddle
with that a bit I think.

    Thomas> Are you maybe looking for the _access function?
    Thomas> http://msdn.microsoft.com/library/en-us/vclib/html/_crt__access.2c_._waccess.asp

Perhaps.  On Unix, definitely not.

-- 
Skip Montanaro (skip at pobox.com - http://www.mojam.com/)




More information about the Python-list mailing list