Patches item #1576166, was opened at 2006-10-12 23:51
Message generated for change (Comment added) made by snaury
You can respond by visiting:
https://sourceforge.net/tracker/?func=detail&atid=305470&aid=1576166&group_id=5470
Please note that this message will contain a full copy of the comment thread,
including the initial issue submission, for this request,
not just the latest update.
Category: Windows
Group: Python 2.6
Status: Closed
Resolution: Accepted
Priority: 5
Submitted By: Alexey Borzenkov (snaury)
Assigned to: Nobody/Anonymous (nobody)
Summary: os.utime acess denied with directories on win32
Initial Comment:
Try the following code:
>>> import os
>>> os.mkdir('8')
>>> os.utime('8',None)
Traceback (most recent call last):
File "<stdin>", line 1, in <module>
WindowsError: [Error 13] Access is denied: '8'
>>>
This fix passes correct flags to CreateFile to
successfully open directories (when built with wide
filenames support, in other case native utime is used
and msvcrt has the very same bug).
----------------------------------------------------------------------
>Comment By: Alexey Borzenkov (snaury)
Date: 2006-10-15 13:47
Message:
Logged In: YES
user_id=1197042
It should now be displayed as public name on SourceForge. :)
Btw, would this patch go into 2.5?
----------------------------------------------------------------------
Comment By: Martin v. Löwis (loewis)
Date: 2006-10-15 12:45
Message:
Logged In: YES
user_id=21627
It seems you are right. Thanks for the patch; committed as
r52335.
Can you please state your real name?
----------------------------------------------------------------------
Comment By: Alexey Borzenkov (snaury)
Date: 2006-10-15 00:31
Message:
Logged In: YES
user_id=1197042
You must be wrong.
First Attempt: I'm enabling Guest account on my system
(supposedly it has the least privileges), and try "file
mtime" command on my Tcl build with identical fix applied:
no error, file mtime was changed successfully.
Second Attempt: While searching the net I found this post
(http://www.cygwin.com/ml/cygwin/2006-03/msg00027.html)
which leads me to the only conclusion that SE_BACKUP_NAME
privilage is actually DISABLED by default, yet opening
directories with FILE_FLAG_BACKUP_SEMANTICS always succeeds
for me, which would not if it needed SE_BACKUP_NAME!
----------------------------------------------------------------------
Comment By: Martin v. Löwis (loewis)
Date: 2006-10-14 23:59
Message:
Logged In: YES
user_id=21627
The patch looks wrong. Opening a file with
FILE_FLAG_BACKUP_SEMANTICS requires the SE_BACKUP_NAME. If
the user does not have the privilege, opening will fail.
This is wrong, because the user still might be able to
change the time stamp of a regular file.
----------------------------------------------------------------------
You can respond by visiting:
https://sourceforge.net/tracker/?func=detail&atid=305470&aid=1576166&group_id=5470
_______________________________________________
Patches mailing list
[email protected]
http://mail.python.org/mailman/listinfo/patches