Tcl Source Code

View Ticket
Login
Ticket UUID: 3613671
Title: [file owned] undocumented Windows defects
Type: Bug Created on: 2013-05-21 18:59:34
Submitter: dgp Assigned to: dgp
Subsystem: 37. File System Severity: Minor
Priority: 5 Medium Last modified: 2016-07-09 14:26:44
Status: Closed Closed by: apnadkarni
Resolution: Fixed Closed on: 2016-07-09 14:26:44
Version: current: 8.6.0
Description:
[file owned] is useless on Windows, always returning true.

This is noted in comments, but not documented.
User Comments:
dkf added on 2013-05-22 17:39:21:
Documented in PORTABILITY section.

Given that we really ought to have enough information to be actually able to answer [file owned] correctly, this bug remains open. Not sure who to assign it to (I know I don't know how to fix it!)

JKU added on 2013-08-16 12:37:00:

I see the following problems:

  • Windows >= Vista: A file created by an Administrator always have the owner for the Administrators group. (The process has to be invoked with "As Administrator").
  • On remote filesystems the owner might be reported as Administrators, but we have to check if we are a member of this group on the remote system.


dkf added on 2013-09-09 09:50:59:

Nothing there that I have any idea how to fix (it's presumably due to issues in the platform-specific parts and not in the generic layer or the documentation); assigning to submitter.


JKU added on 2013-09-13 21:04:29:

How windows calculates the effective permissions: http://technet.microsoft.com/en-us/library/cc772184.aspx#sectionSection1


apnadkarni added on 2016-07-09 11:17:13:
Implemented in check-in [4fe9800f92]. Owner check is made using the actual owner SID stored on the file system versus the current process SID. Ownership based on group membership is NOT checked as (besides being much more complex) I don't even think that is the correct thing to do.