?TC 8.51rc1 NTFS Permissions when moving files

The behaviour described in the bug report is either by design, or would be far too complex/time-consuming to be changed

Moderators: Hacker, petermad, Stefan2, white

Post Reply
User avatar
ghisler(Author)
Site Admin
Site Admin
Posts: 50541
Joined: 2003-02-04, 09:46 UTC
Location: Switzerland
Contact:

Post by *ghisler(Author) »

This is controlled by XPMoveMethod= option. From the help:

1: When moving files within a drive, the permissions of the target folder are used
2: As 1, but when moving folders, all files and subfolders in them are changed to the target permissions too
0: The permissions of the files are kept
Default: XP:1, other systems: 0
Author of Total Commander
https://www.ghisler.com
User avatar
MVV
Power Member
Power Member
Posts: 8711
Joined: 2008-08-03, 12:51 UTC
Location: Russian Federation

Post by *MVV »

ghisler,
I would prefer copying permissings when 'copy permissions' checkbox is checked in case of move too (otherwise checkbox should be disabled because it does nothing, and help should note why it is disabled).
User avatar
ghisler(Author)
Site Admin
Site Admin
Posts: 50541
Joined: 2003-02-04, 09:46 UTC
Location: Switzerland
Contact:

Post by *ghisler(Author) »

So where is the problem?

Moving a file is just moving a pointer in the file system, which also moves all the permissions (which are just in the metadata of the file).
Author of Total Commander
https://www.ghisler.com
User avatar
MVV
Power Member
Power Member
Posts: 8711
Joined: 2008-08-03, 12:51 UTC
Location: Russian Federation

Post by *MVV »

Permissions may be own and inherited, and own ones are kept in file metadata while inherited ones come from parent folder (but there is a flag to disable inheritance).

Actually I've tried to move file between two folders with different permissions, and TC really keeps file permissions on move with 'copy permissions' option, it copies permissions that I set for file, it even copies inherited permissions that are missed in target folder. E.g. I've set 'deny write for administrators' for file and 'deny write for local_service' for folder - and TC have copied both! Tested with non-elevated TC 8.51RC1x32 with default value of XPMoveMethod (it is not set). While moving via tcmadmin, permissions were not kept, however after adding XPMoveMethodAdmin=0 all work fine, move keeps inheritance and additional permissions, just like in case of copy. :)

BTW default value for XPMoveMethod is not specified in help. And I don't understand why default values for XPMoveMethod and XPMoveMethodAdmin are different.
User avatar
ghisler(Author)
Site Admin
Site Admin
Posts: 50541
Joined: 2003-02-04, 09:46 UTC
Location: Switzerland
Contact:

Post by *ghisler(Author) »

BTW default value for XPMoveMethod is not specified in help.
It's not specified on the left because it's system-dependent. That's described on the right side.
Author of Total Commander
https://www.ghisler.com
User avatar
MVV
Power Member
Power Member
Posts: 8711
Joined: 2008-08-03, 12:51 UTC
Location: Russian Federation

Post by *MVV »

Thanks, now I see the last line with defaults. But is it related to XP only or to XP and later OS?
User avatar
ghisler(Author)
Site Admin
Site Admin
Posts: 50541
Joined: 2003-02-04, 09:46 UTC
Location: Switzerland
Contact:

Post by *ghisler(Author) »

It's XP or newer - the help entry was created when XP was the latest Windows version.
Author of Total Commander
https://www.ghisler.com
User avatar
ghisler(Author)
Site Admin
Site Admin
Posts: 50541
Joined: 2003-02-04, 09:46 UTC
Location: Switzerland
Contact:

Post by *ghisler(Author) »

I cannot reproduce this, I do not get a folder with a padlock.

When you set XPMoveMethod=0, TC will just move the folder without trying to change any permissions. When you set XPMoveMethod=1, TC will change the permissions to inherit from parent, like the Explorer does it.
Author of Total Commander
https://www.ghisler.com
User avatar
ghisler(Author)
Site Admin
Site Admin
Posts: 50541
Joined: 2003-02-04, 09:46 UTC
Location: Switzerland
Contact:

Post by *ghisler(Author) »

Can you give me more information, please? What are the permissions of:
1. The source file
2. The target directory
3. The file after COPYING it to the target (please give it a different name so you can still do step 4)
4. The file after MOVING it to the target with "Copy NTFS..." NOT checked?
Author of Total Commander
https://www.ghisler.com
Post Reply