Artifacts Associated With Ticket 1394972
Ticket change [3c6ec8c81c] (rid 120917) by fvogelnew1 on 2006-01-01 21:27:48:
- assignee initialized to: "vincentdarley"
- cmimetype initialized to: "text/plain"
- comment initialized to:
Consider this, on Windows XP or 2000 (replace <my_account> by your real info): file exists "C:/Documents and Settings/<my_account>/NTUSER.DAT" 1 file readable "C:/Documents and Settings/<my_account>/NTUSER.DAT" 1 open "C:/Documents and Settings/<my_account>/NTUSER.DAT" r couldn't open "C:/Documents and Settings/<my_account>/NTUSER.DAT": permission denied How come? I know that Windows has this file permanently open while my session is open, but shouldn't file readable spit 0 instead of 1? Is this perhaps another incarnation of bug 1193497?
- foundin initialized to: "obsolete: 8.4.12"
- priority initialized to: "5 Medium"
- resolution initialized to: "None"
- status initialized to: "Open"
- submitter initialized to: "fvogelnew1"
- subsystem initialized to: "37. File System"
- title initialized to: "file readable lies for certain XP files"
- type initialized to: "Bug"
Ticket change [e0583756ae] (rid 115174) by fvogelnew1 on 2006-03-06 05:24:40:
- icomment:
Logged In: YES user_id=1245417 Hi, Investigating a bit more on this it is clear that Windows has set a lock on the file I want to read from. I found no way to detect this before trying to open the file in Tcl, so file readable should definitely tell me I can't read it. Any idea? Thanks.
- login: "fvogelnew1"
- mimetype: "text/plain"
- username: "fvogelnew1"
- icomment:
Ticket change [18a93cb82a] (rid 122697) by vincentdarley on 2006-03-10 17:32:53:
- icomment:
Logged In: YES user_id=32170 Please can you check with tcl 8.5a4?
- login: "vincentdarley"
- mimetype: "text/plain"
- username: "vincentdarley"
- icomment:
Ticket change [521ffb6ddd] (rid 126258) by fvogelnew1 on 2006-03-10 18:55:43:
- icomment:
Logged In: YES user_id=1245417 Downloaded tcl8.5a4 from ftp://ftp.tcl.tk/pub/tcl/tcl8_5/tcl8.5a4rc0-src.tar.gz and installed. Same behavior as in my initial report, therefore not yet fixed. I also tried with Tcl/Tk cvs HEAD (with patch for bug 1193497 geared in). File readable still wrongly spits 1. Francois
- login: "fvogelnew1"
- mimetype: "text/plain"
- username: "fvogelnew1"
- icomment:
Ticket change [5ff1fbe34c] (rid 115907) by vincentdarley on 2006-03-16 06:12:55:
- icomment:
Logged In: YES user_id=32170 Indeed, even with latest cvs HEAD today, this is still wrong. Any suggestion to how to fix?
- login: "vincentdarley"
- mimetype: "text/plain"
- username: "vincentdarley"
- icomment:
Ticket change [6f9212e37e] (rid 100338) by mistachkin on 2006-03-16 06:54:36:
- icomment:
Logged In: YES user_id=113501 1. The "Permission denied" for the NTUSER.DAT file is basically a sharing violation (the OS has it opened for exclusive access). 2. There is no way that I know of on Windows to determine if opening a file will result in a sharing violation without actually attempting to open the file. If the [file readable] code actually did this, it could still end up being inaccurate (race condition; somebody opens the file after you check [file readable] but before you actually open the file). 3. I believe that the intention of [file readable] is to check to see if the user would have permission to open the file based on the file permissions (the DACL on NT). Vince, does the current code check the DACL properly on Windows and the file permissions on Unix?
- login: "mistachkin"
- mimetype: "text/plain"
- username: "mistachkin"
- icomment:
Ticket change [eb67b0d41f] (rid 103539) by fvogelnew1 on 2006-03-17 05:09:28:
- icomment:
Logged In: YES user_id=1245417 Joe, What you say below really makes sense to me. I have worked around this by attempting to open the file and catch the possible error. On 1. and 2. I fully agree. Your question 3. also really makes sense when linked to bug 1193497. For my first tries (Windows only) on files, file readable apparently reads the read permission. For directories however, I'm wondering. It seems to always return 0, regardless of the permissions set. The readonly flag cannot be set through the explorer (see explanations about this in bug 1193497). Francois
- login: "fvogelnew1"
- mimetype: "text/plain"
- username: "fvogelnew1"
- icomment:
Ticket change [a3d5f88f72] (rid 110106) by nobody on 2006-03-17 05:39:22:
- icomment:
Logged In: NO Certainly tclWinFile.c contains code to read ACLs. I believe the code is correct, but, frankly, I don't fully understand this stuff (and why it has to be so complicated, and why there are file vs directory differences). So, do look over the code there, but otherwise it seems this bug report should be closed as 'won't fix - OS limitation'. Vince.
- login: "nobody"
- mimetype: "text/plain"
- username: "nobody"
- icomment:
Ticket change [417cdf5952] (rid 116200) by vincentdarley on 2006-03-19 01:18:44:
- closedate changed to: "2006-03-18T18:18:44"
- closer changed to: "vincentdarley"
- icomment:
Logged In: YES user_id=32170 I added a 'knownBug' test to fCmd.test for this.
- login: "vincentdarley"
- mimetype: "text/plain"
- resolution changed to: "Wont Fix"
- status changed to: "Closed"
- username: "vincentdarley"
Ticket change [8e5b430359] (rid 136972) by andreask on 2014-02-19 20:32:03:
- submitter changed to: "fvogel"