ZTree.com  | ZEN  | About...  

 Index   Back

Mystery Solved!   [Zeta]

By: John Gruener     Orlando, Florida  
Date: Jun 06,2022 at 22:18
In Response to: Non-Admin writing to "C:\Program Files\ZTreeWin" (Andrew Penfold)

Hi Andrew,

> The key to this may be that you //moved// the ZTW.INI

Indeed it is! You are absolutely correct! I was focused on the directory and ZTW_CFG.EXE permissions, but neither is a factor.

> This type of move probably maintained the permissions on ZTW.INI that
> were inherited from %appdata% granting you full control on that file, in
> spite of its new location.

Yes. Under %AppData% it inherited the permissions of the "C:\Users\(username)" directory. When moved it removed the inheritance and granted its own full control that it had from %AppData%. If, instead of moved it is copied then deleted, which is what I must have done the first time, it takes the inheritance from "C:\Program Files", disallowing any changes.

> A move within an NTFS filesystem tends to just change the parent
> directory and maintain everything else about the file.

Yes.

> Moving using Win Explorer might make the file re-inherit permissions from the
> new parent directory, depending on Windows version. I remember back in Windows
> XP/2003 it needed "Simple File Sharing" to make this happen but at some
> later version or became the default, but only for moves done by Windows
> Explorer.

To do these moves and renames under "C:\Program Files" I'm using another copy of ZTree running as Admin, and not installed under "C:\Program Files". The moved ZTW.HST and ZTW.ZAM files are also allowing full control from non-Admin, but I assume ZTree's internal coding is disallowing the updates. I can use ZTree's Hex View and Edit to change both of these if moved, but not if copied.

I just tried moving these files with Win Explorer. It of course informed me I had to give it Admin privileges, which I did. There was a brief progress bar as if some processing had to take place as the files were moved. I then inspected the permissions, only to find they are very different from when moved by ZTree. The Security tab Advanced screen shows my user login as having full control, which is confirmed by Hex Editing them with non-Admin ZTree. But it says that full control is inherited from "C:\Program Files", which is clearly not the case. Without Admin I cannot create or update anything else under "C:\Program Files". Very strange.

In any case, thanks Andrew for your help in solving this!

- John

448 views      
 

Messages in this Thread

 
96,456 Postings in 12,197 Threads, 350 registered users, 125 users online (0 registered, 125 guests)
Index | Admin contact |   Forum Time: Sep 30, 2023 - 6:26 am UTC  |  Hits:58,244,661  (9,408 Today )
RSS Feed