Copying of inaccessible folders is silently skipped

Bug reports will be moved here when the described bug has been fixed

Moderators: white, Hacker, petermad, Stefan2

Post Reply
mkobylan
Junior Member
Junior Member
Posts: 12
Joined: 2012-01-01, 22:31 UTC

Copying of inaccessible folders is silently skipped

Post by *mkobylan »

When copying from NTFS disk drive it skips all folders which have permissions set to not having access for current user. User is not notified which is wrong.
How to reproduce it:
1. create folder (e.g. c:\temp) and place some files inside
2. create forlder inside it (e.g. c:\temp\temp) and place some files inside
3. remove all permissions from inner folder c:\temp\temp (deselect inheritance and click 'Remove')
4. go to c:\ on the left window
5. try to copy c:\temp folder to somewhere
=> c:\temp\temp is created but it is empty
This can result in data loss when someone makes backup by copying.
I recommend to check also other batch operations (search, move, rename, synchronize) if nothing is skipped due to permissions.
Thanks
User avatar
ghisler(Author)
Site Admin
Site Admin
Posts: 48088
Joined: 2003-02-04, 09:46 UTC
Location: Switzerland
Contact:

Post by *ghisler(Author) »

This behaviour is intentional. Currently TC will only copy protected folders if you have entered them before in that session, and confirmed the user account control dialog. It may be a good idea, though, to show a warning that some folders couldn't be copied.
Author of Total Commander
https://www.ghisler.com
mkobylan
Junior Member
Junior Member
Posts: 12
Joined: 2012-01-01, 22:31 UTC

Post by *mkobylan »

Let me describe situation where this behavior makes complications:
Few people are working on shared folder and contribute to some content. Some are copying files (inheriting permissions of that folder), others are moving files (preserving permissions from their Documents folder where only that particular user has access). The result is unintentional mix of permissions. Hard to backup, hard to do something with it.
I use Total commander because it doesn't hide information from me as explorer does. I would love to have this transparency also in this case. Same way we have it now with files opened with dwShareMode=0.
Btw. FILE_SHARE_READ - Total commander allows to copy incomplete files but shows no warning when this happens during copying multiple files - this is also potentially dangerous. But you can say it's not possible to detect such situations in all 100% cases - files can be accumulated in currently copied folder from other processes without any notification...
User avatar
ghisler(Author)
Site Admin
Site Admin
Posts: 48088
Joined: 2003-02-04, 09:46 UTC
Location: Switzerland
Contact:

Post by *ghisler(Author) »

OK, beta 15 is now showing an error when it cannot copy a folder, and offers to copy it as admin. Can you try it please?
Author of Total Commander
https://www.ghisler.com
User avatar
Flint
Power Member
Power Member
Posts: 3487
Joined: 2003-10-27, 09:25 UTC
Location: Antalya, Turkey
Contact:

Post by *Flint »

I tested this and confirm that now it shows a dialog if source directory cannot be read. The CopyDirsAsAdmin key also seems to behave as described in the help.

However, if the directory cannot be read even by admin, then TC does not show any message and simply skips it. Is it intentional? I suppose, in this case TC should warn the user who otherwise might think that everything was copied (since he allowed elevation).
Flint's Homepage: Full TC Russification Package, VirtualDisk, NTFS Links, NoClose Replacer, and other stuff!
 
Using TC 10.52 / Win10 x64
mkobylan
Junior Member
Junior Member
Posts: 12
Joined: 2012-01-01, 22:31 UTC

Post by *mkobylan »

I also tested this and it works as expected. Thank you.
About not copying even for administrator: maybe you could add button "as another user" for convenience; though not necessary because user was already warned. Or warning dialog may be looped until the reading problem is resolved by some option from dialog or skipped completely.
User avatar
ghisler(Author)
Site Admin
Site Admin
Posts: 48088
Joined: 2003-02-04, 09:46 UTC
Location: Switzerland
Contact:

Post by *ghisler(Author) »

Thanks!
Author of Total Commander
https://www.ghisler.com
User avatar
Flint
Power Member
Power Member
Posts: 3487
Joined: 2003-10-27, 09:25 UTC
Location: Antalya, Turkey
Contact:

Post by *Flint »

ghisler(Author)
What about showing a warning if TC failed to copy the directory even with admin permissions? Its absense is very dangerous. User will be sure that everything has been copied (especially since he gave the maximum permissions), so he might delete all the original data, thus losing them irreversibly.
Flint's Homepage: Full TC Russification Package, VirtualDisk, NTFS Links, NoClose Replacer, and other stuff!
 
Using TC 10.52 / Win10 x64
User avatar
ghisler(Author)
Site Admin
Site Admin
Posts: 48088
Joined: 2003-02-04, 09:46 UTC
Location: Switzerland
Contact:

Post by *ghisler(Author) »

What about showing a warning if TC failed to copy the directory even with admin permissions?
Hmm, sounds quite annoying - maybe as an option...
Author of Total Commander
https://www.ghisler.com
User avatar
petermad
Power Member
Power Member
Posts: 14809
Joined: 2003-02-05, 20:24 UTC
Location: Denmark
Contact:

Post by *petermad »

What about showing a warning if TC failed to copy the directory even with admin permissions? Its absense is very dangerous. User will be sure that everything has been copied (especially since he gave the maximum permissions), so he might delete all the original data, thus losing them irreversibly.
But if the user can't copy the directy, would he be able to delete it then?
License #524 (1994)
Danish Total Commander Translator
TC 11.03 32+64bit on Win XP 32bit & Win 7, 8.1 & 10 (22H2) 64bit, 'Everything' 1.5.0.1371a
TC 3.50 on Android 6 & 13
Try: TC Extended Menus | TC Languagebar | TC Dark Help | PHSM-Calendar
User avatar
Flint
Power Member
Power Member
Posts: 3487
Joined: 2003-10-27, 09:25 UTC
Location: Antalya, Turkey
Contact:

Post by *Flint »

petermad wrote:But if the user can't copy the directy, would he be able to delete it then?
He may be:
a) when permissions do not allow reading but allow deleting (admit, it's a rare situation in real life, but theoretically possible).
b) when he reinstalls Windows and formats the whole partition.
c) when he uses some Linux-based LiveCD to access the partition (Linux NTFS drivers usually ignore the permissions).
Flint's Homepage: Full TC Russification Package, VirtualDisk, NTFS Links, NoClose Replacer, and other stuff!
 
Using TC 10.52 / Win10 x64
User avatar
Flint
Power Member
Power Member
Posts: 3487
Joined: 2003-10-27, 09:25 UTC
Location: Antalya, Turkey
Contact:

Post by *Flint »

I confirm that 8.0β17 now displays a warning when admin-unreadable directory was met.
Thanks!
Flint's Homepage: Full TC Russification Package, VirtualDisk, NTFS Links, NoClose Replacer, and other stuff!
 
Using TC 10.52 / Win10 x64
Post Reply