Privilege escalation not working at Syncronize dirs
Moderators: Hacker, petermad, Stefan2, white
Privilege escalation not working at Syncronize dirs
Hi, I searched for a report of this bug and I could not find one, so I hope I am not double reporting.
I have a computer with 2 hard drives running Win 7 x64, TC 7.50a. The second drive in the computer that is write protected to all except administrators - that drive is kind of a soft backup of the first drive. I copy files (F5) from the first drive to the second, privilege escalation is triggered, I confirm, it works. I try to do the same by synchronizing the directories and it starts copying from drive 1 to 2, it asks for privilege escalation, I confirm, I get an error that the current file on drive 2 cannot be accessed - it is supposed to be overwritten.
I have a computer with 2 hard drives running Win 7 x64, TC 7.50a. The second drive in the computer that is write protected to all except administrators - that drive is kind of a soft backup of the first drive. I copy files (F5) from the first drive to the second, privilege escalation is triggered, I confirm, it works. I try to do the same by synchronizing the directories and it starts copying from drive 1 to 2, it asks for privilege escalation, I confirm, I get an error that the current file on drive 2 cannot be accessed - it is supposed to be overwritten.
- ghisler(Author)
- Site Admin
- Posts: 50383
- Joined: 2003-02-04, 09:46 UTC
- Location: Switzerland
- Contact:
Here my tries:
0. If target may be read by user (but may be written only by admin), and target file doesn't exist, TC shows error, I choose 'as admin', file is copied.
1. Like 0, but target file exists. TC asks to replace, I choose 'as admin', file is replaced.
2. Like 0, but file is copied into subfolder of protected folder, and this subfolder doesn't exist. TC shows error, I choose 'as admin', but TC fails to create subfolder and file is not copied.
3. If target is inaccessible for user (only admin have read/write access), and I entered to target folder in TC using 'as admin', I open sync tool and it suggests to copy all folders contents from source to target (since sync tool can't see contents of target subfolders so can't compare them with source). So I need to start sync tool from elevated TC instance anyway.
Maybe it is possible to move all operations code (sync, copy, move, split, merge) to some DLL so both TC and TCMADMIN can use it (theese functions will receive just filelists and maybe some environment)?
0. If target may be read by user (but may be written only by admin), and target file doesn't exist, TC shows error, I choose 'as admin', file is copied.
1. Like 0, but target file exists. TC asks to replace, I choose 'as admin', file is replaced.
2. Like 0, but file is copied into subfolder of protected folder, and this subfolder doesn't exist. TC shows error, I choose 'as admin', but TC fails to create subfolder and file is not copied.
3. If target is inaccessible for user (only admin have read/write access), and I entered to target folder in TC using 'as admin', I open sync tool and it suggests to copy all folders contents from source to target (since sync tool can't see contents of target subfolders so can't compare them with source). So I need to start sync tool from elevated TC instance anyway.
Maybe it is possible to move all operations code (sync, copy, move, split, merge) to some DLL so both TC and TCMADMIN can use it (theese functions will receive just filelists and maybe some environment)?
- ghisler(Author)
- Site Admin
- Posts: 50383
- Joined: 2003-02-04, 09:46 UTC
- Location: Switzerland
- Contact:
2MVV
I couldn't reproduce the original error reported by AdrianB1 (overwriting existing files). Can you reproduce it?
Folder creation is indeed not currently supported, sorry. Maybe in a later release.
I couldn't reproduce the original error reported by AdrianB1 (overwriting existing files). Can you reproduce it?
Folder creation is indeed not currently supported, sorry. Maybe in a later release.
Author of Total Commander
https://www.ghisler.com
https://www.ghisler.com
ghisler,
I can't reproduce it too, my tests show it. I'm using sync frequently (within write-protected folders too) but I can't say that TC fails on overwriting files.
AdrianB1,
Can you reproduce error any time you want? Please try to reproduce it with clean INI (start TC with parameter /i=newini.ini). If you can reproduce error, please give us step-by-step instructions.
I can't reproduce it too, my tests show it. I'm using sync frequently (within write-protected folders too) but I can't say that TC fails on overwriting files.
AdrianB1,
Can you reproduce error any time you want? Please try to reproduce it with clean INI (start TC with parameter /i=newini.ini). If you can reproduce error, please give us step-by-step instructions.
- ghisler(Author)
- Site Admin
- Posts: 50383
- Joined: 2003-02-04, 09:46 UTC
- Location: Switzerland
- Contact:
Thanks, that would be nice! I haven't changed that in TC 7.55 beta yet, so it's sufficient when you test it with TC 7.50a.
Author of Total Commander
https://www.ghisler.com
https://www.ghisler.com
I tested today with /i=newini.ini and the scenarios presented by MVV. The destination folder has the following NTFS rights: Everyone: read only; Administrators: Full Control; the current user is an administrator and privilege escalation is triggered.
0. It works
1. Not tested
2. It does not work. It does not create the subfolder before copying the first file, so it cannot work. I created the subfolder manually (using TC but with F7), it does so and when I try again to sync the files for this subfolder it works as expected (asking for privilege escalation).
Just guessing (I hope I am not anoying with the speculations) that the subfolder creation does not ask for privilege escalation (I see no prompt for this), it tries and fails, next the file copy fails as the target subfolder does not exist.
0. It works
1. Not tested
2. It does not work. It does not create the subfolder before copying the first file, so it cannot work. I created the subfolder manually (using TC but with F7), it does so and when I try again to sync the files for this subfolder it works as expected (asking for privilege escalation).
Just guessing (I hope I am not anoying with the speculations) that the subfolder creation does not ask for privilege escalation (I see no prompt for this), it tries and fails, next the file copy fails as the target subfolder does not exist.
- ghisler(Author)
- Site Admin
- Posts: 50383
- Joined: 2003-02-04, 09:46 UTC
- Location: Switzerland
- Contact:
Yes, I have already confirmed the subfolder problem above, it will be fixed in the next beta. However, I still cannot reproduce the situation described in your first post, where overwriting of an existing file would fail due to privilege problems. In that case, the folder already exists, otherwise the file couldn't exist there either.
Author of Total Commander
https://www.ghisler.com
https://www.ghisler.com
- ghisler(Author)
- Site Admin
- Posts: 50383
- Joined: 2003-02-04, 09:46 UTC
- Location: Switzerland
- Contact:
OK, just let me know if you encounter it again in the future.
Author of Total Commander
https://www.ghisler.com
https://www.ghisler.com