remove read only flag

Cliff Wells logiplexsoftware at earthlink.net
Thu May 2 13:42:52 EDT 2002


On 2 May 2002 09:47:27 -0700
Lemniscate wrote:

> Cliff Wells <logiplexsoftware at earthlink.net> wrote in message
news:<mailman.1020286325.6919.python-list at python.org>...
> > On 1 May 2002 13:36:13 -0700
> 
> > os.chmod(filename, 644) works on Win2k, provided of course you own the file
or
> > otherwise have adequate permissions to alter it.  If you don't have those
> > permissions then I don't see how using attrib is going to get around that. 

> > 
> > Unless-it's-another-Windows-security-hole'ly yrs,
> 
> No, not another security hole; attrib works the same as the
> file-permissions (in my experience).  I didn't put it, but since you
> are iterating over a list, you can flag files you can't modify.  Also,
> you may want certain files to retain some of their other, 'default'
> file permissions (attrib changes only what you put).  This is what I
> meant about being careful about changing fps.  Excellent point,
> though

True.  I'm not sure how the Unix permission scheme is mapped onto the Windows
scheme.  I suppose if I had any sort of initiative I'd look in Python's
platform-specific files and find out ;)  Using attrib at least makes it obvious
what exactly you are changing.  

-- 
Cliff Wells, Software Engineer
Logiplex Corporation (www.logiplex.net)
(503) 978-6726 x308  (800) 735-0555 x308





More information about the Python-list mailing list