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.


> 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


Messages in this Thread

96,640 Postings in 12,231 Threads, 350 registered users, 64 users online (0 registered, 64 guests)
Index | Admin contact |   Forum Time: Apr 12, 2024 - 3:48 pm UTC  |  Hits:62,819,047  (14,578 Today )
RSS Feed