File and directory permissions in windows
ismael.pernas.c at gmail.es
Mon Oct 23 17:46:49 CEST 2006
No feel guilty because all of us have a lot of things to do and usualy we
dont have time to do it.
My objective is check if some directories exist and if the user that execute
the perl script has access to some files and directories. If one of this
checkpoints failed the execution will be aborted. If all of then finish ok
the execution will continue. It's simply this.
Those scripts will be executed on windows and linux. I start to look python
because the MS-DOS utilities were so basic and when i try to do the same
with python i found the same problem with the permissions :P Then i try
Perl and what happens? the same problem...
Thanks for all.
Tim Golden wrote:
> | I have some problems to get the the permissions on windows. I
> | use a simple code that run perfectly in UNIX but give me wrong
> | information on Windows. I found this code searching by google:
> [... snip ...]
> | is there a solution for this?, another library or code?
> | Anything that i do wrong?
> Well, I'm certainly feeling guilty, because I've had a
> note on my TODO list since the last time this came up
> a month or so ago.
> In short, Windows doesn't really map the read/write/exec
> Posix model especially logically. AFAICT, the MS CRT code
> doesn't take account of NT permissions or things like PATHEXT
> at all -- which would give you non-readable or executable.
> The traditional DOS model only supports read-only
> (and hidden/system/archived which don't apply here) so
> there's no way, eg, for any combination of flags to indicate
> In short, *I* need to provide that doc patch I got halfway
> through, and *you* need to find a way around whatever you're
> trying to do on Windows. Depending on what you're after, you
> might end up with some sort of try-except framework, or using
> the win32security module from the pywin32 extensions.
> Feel free to post again indicating what you're trying to do
> with the stat information.
> This e-mail has been scanned for all viruses by Star. The
> service is powered by MessageLabs. For more information on a proactive
> anti-virus service working around the clock, around the globe, visit:
More information about the Python-list