TC admin tool doesn't copies access rights

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

Moderators: Hacker, petermad, Stefan2, white

User avatar
MVV
Power Member
Power Member
Posts: 8711
Joined: 2008-08-03, 12:51 UTC
Location: Russian Federation

TC admin tool doesn't copies access rights

Post by *MVV »

When I copy file with 'copy access rights' from TC started with admin rights, all goes well. But when I try to do the same from un-elevated TC, it asks for elevation and copies file, but w/o acces rights.
User avatar
ghisler(Author)
Site Admin
Site Admin
Posts: 50421
Joined: 2003-02-04, 09:46 UTC
Location: Switzerland
Contact:

Post by *ghisler(Author) »

Indeed this isn't currently supported - maybe in a later version.
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 »

OK, thanks. But it may confuse you if you don't know about it.
User avatar
ghisler(Author)
Site Admin
Site Admin
Posts: 50421
Joined: 2003-02-04, 09:46 UTC
Location: Switzerland
Contact:

Post by *ghisler(Author) »

This has been added to TC 7.55 beta, please test it!
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, I saw your post just today, so I rechecked feature once again.

For files permissions copied correctly.
But for folders permissions are not copied. E.g. if I have in write-protected folder AAA some subfolder BBB that has full permissions (so I can add/delete/modify files inside of it), after copying BBB or AAA to protected folder BBB loses full rights. If I copy to normal folder, permissions transferred correctly (here TCMADMIN is not used).
User avatar
ghisler(Author)
Site Admin
Site Admin
Posts: 50421
Joined: 2003-02-04, 09:46 UTC
Location: Switzerland
Contact:

Post by *ghisler(Author) »

Indeed there is no folder copy function, sorry. Folders are created on demand, only files are copied. Currently it's therefore not possible to copy folder permissions, sorry. Maybe in a later release. I will try to add it to 7.55, but cannot promise anything yet.
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 »

I think it would be really useful because it is incompleted feature w/o copying folder permissions. Thanks. :)
User avatar
MVV
Power Member
Power Member
Posts: 8711
Joined: 2008-08-03, 12:51 UTC
Location: Russian Federation

Post by *MVV »

Great thanks, tcmadmin can now copy folder permissions! :D

Now we need to learn TC itself to do this. :)
(not all copy operations performed via tcmadmin, if TC started elevated, it should copy folder permissions too)
User avatar
ghisler(Author)
Site Admin
Site Admin
Posts: 50421
Joined: 2003-02-04, 09:46 UTC
Location: Switzerland
Contact:

Post by *ghisler(Author) »

Nice to hear that it works for you now!
Now we need to learn TC itself to do this.
I don't understand what you mean with that. If I copy the directory normally (not via tcmadmin) and tick the checkbox to copy NTFS permissions, they are copied as well.
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(Author) wrote:
Now we need to learn TC itself to do this.
I don't understand what you mean with that. If I copy the directory normally (not via tcmadmin) and tick the checkbox to copy NTFS permissions, they are copied as well.
For files it works. But folder permissions are lost if I copy using just TC started with admin rights.
Last edited by MVV on 2010-05-12, 09:08 UTC, edited 2 times in total.
User avatar
ghisler(Author)
Site Admin
Site Admin
Posts: 50421
Joined: 2003-02-04, 09:46 UTC
Location: Switzerland
Contact:

Post by *ghisler(Author) »

Cannot confirm. I have just added a "deny all" right to a folder for some other user, and it is copied well.

Maybe the rights which aren't copied are just inherited rights? TC only copies the "inherit" flag, it doesn't explicitly duplicate inherited rights.
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 »

E.g. for TOTALCMD folder I have permissions: system (full), admins (full), users (read-only) and parent permissions are not inherited. Inside of TC folder I have some subfolders (Bars, Language) with added write permissions, also I have some files (fsplugin.ini, wincmd.ini etc) with added write permissions for users. So I can keep TC settings in its folder and use UAC benefits.

When I copy folder into write-protected folder, TCMADMIN does all as needed (thanks again :)).

But when I copy TOTALCMD folder into some folder using 'copy permissions' from elevated TC, permissions for files are copied, but new folders have default (=inherited) permissions. The worst thing is that since new TOTALCMD folder get new permissions (including 'trusted users' that are all users of domain including me), and all files inherit this permission, so every non-elevated account can now modify program files.

BTW sometimes it works well... :shock:
I see that if I copy TOTALCMD folder into write-protected for users folder, folder permissions are copied. But if I copy TOTALCMD folder into full access folder, permissions aren't copied! All this I do under elevated TC copy with 'copy NTFS permissions' flag.

I can't check permissions copying to full access folder using TCMADMIN since TC doesn't ask for elevation during copy. :)
User avatar
ghisler(Author)
Site Admin
Site Admin
Posts: 50421
Joined: 2003-02-04, 09:46 UTC
Location: Switzerland
Contact:

Post by *ghisler(Author) »

Sorry, cannot confirm. Did you read my remark about inherited permissions? I guess that the copied folder inherits all these permissions from the folder where TOTALCMD is located (Program files?).
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 »

Source folder have path D:\TOTALCMD and it doesn't inherit parent folder's permissions, it has its own ones.

I'm not sure TC copies 'inherited' flag.

D:\test\src\ (default perms)

D:\test\src\up\ (do not inherit, only two users allowed: Users - read-only, Admins - full)
D:\test\src\up\up.txt
D:\test\src\up\dn\
D:\test\src\up\dn.txt (do not inherit, only Users - read-only)


D:\test\dst (default perms)
D:\test\dst_rdo (do not inherit, only three users allowed: All, Users - read-only, Admins - full)

Copy D:\test\src\up folder to D:\test\dst and to D:\test\dst_rdo using elevated TC 7.55 RC1:
D:\test\dst\up\ (inherited perms :!:, user SYSTEM inherited)
D:\test\dst\up\dn\dn.txt (inherited perms :!: :shock: )
D:\test\dst_rdo\up\ (inherited perms :!:, user All inherited)
D:\test\dst_rdo\up\dn\dn.txt (inherited perms :!: :shock: )

Copy D:\test\src\up folder to D:\test\dst_rdo using non-elevated TC and TCMADMIN:
D:\test\dst_rdo\up\ (inherited perms :!:, user All inherited)
D:\test\dst_rdo\up\dn\dn.txt (inherited perms :!: :shock: )

I don't uderstand anything. :shock:
User avatar
ghisler(Author)
Site Admin
Site Admin
Posts: 50421
Joined: 2003-02-04, 09:46 UTC
Location: Switzerland
Contact:

Post by *ghisler(Author) »

Sorry, I don't understand your tests. What permissions does your target directory have?
Author of Total Commander
https://www.ghisler.com
Post Reply