Set to default: Copy NTFS Permissions

English support forum

Moderators: Hacker, petermad, Stefan2, white

Post Reply
ig88
Junior Member
Junior Member
Posts: 5
Joined: 2021-12-14, 20:13 UTC

Set to default: Copy NTFS Permissions

Post by *ig88 »

My use case:
I have sensitive, eyes-only files/directories in let's say, t:\supersecret. Files must retain their restricted group ownership even if they get accidentely copied to a t:\public1. By default, windows file explorer will make files inherit permissions once copied to a less secure destination.

I want this to be the default in case I have a user who has access to both areas and forgets to click the box.

Frontend: Windows 10 clients
The backend: Linux servers (redhat 7) hosting samba
Note that the linux group ownership of public1 (relates to t:\public1 samba share) is set to nobody.
So, the beginning looks like this:
drwxrwx--- root nobody 1234 5678 filename.txt

Windows 10 clients see a T: drive. Not sure if relevant, but individual directories on T: are separate samba shares but we use msdfs to make it appear on the same drive.

In TC, I've played with XPMoveMethod=0 and SamePartitions=T but each time I do a test copy, the "Copy NTFS Permissions" is not selected. On a whim, I tried it anyway without selecting the box and the file inherits permissions.

Please let me know if this is going to be fixed or am I missing something on how to make it the default? I've seen some chatter in the forum about "Copy NTFS permissions" but I couldn't find anything that sets this checkbox by default.

In my use case, I would rather have it checked by default (and deal with any permissions issues) than expose sensitive data when somebody forgot to check the box.

Thanks all.
ig88
Junior Member
Junior Member
Posts: 5
Joined: 2021-12-14, 20:13 UTC

Re: Set to default: Copy NTFS Permissions

Post by *ig88 »

Looking at my above comment about nobody, filename.txt was incorrect.
It should have read:
drwxrwx--- root nobody 1234 5678 public1
User avatar
MVV
Power Member
Power Member
Posts: 8711
Joined: 2008-08-03, 12:51 UTC
Location: Russian Federation

Re: Set to default: Copy NTFS Permissions

Post by *MVV »

Would it help too much if TC provide such option if one can copy a file via Explorer and lost its permissions?
ig88
Junior Member
Junior Member
Posts: 5
Joined: 2021-12-14, 20:13 UTC

Re: Set to default: Copy NTFS Permissions

Post by *ig88 »

The reference to file manager was to illustrate the problem. I’m evaluating TC to potentially replace it via non technical policy.
User avatar
Dalai
Power Member
Power Member
Posts: 9945
Joined: 2005-01-28, 22:17 UTC
Location: Meiningen (Südthüringen)

Re: Set to default: Copy NTFS Permissions

Post by *Dalai »

Unfortunately it wasn't stated in the OP if the "Copy NTFS permissions" option worked in the test case. AFAIK file/directory permissions on a Samba share are either inherited from the parent directory (with (POSIX) ACLs when set accordingly), the settings of that share (create mask, directory mask along with some others), or the umask. This means that the permissions are inherited from somewhere, not copied with the file.

I don't know if it's possible to do what you want to achieve. Also keep in mind that only a file's owner and root are allowed to set permissions and timestamps on that file (on Linux by default).

Regards
Dalai
#101164 Personal licence
Ryzen 5 2600, 16 GiB RAM, ASUS Prime X370-A, Win7 x64

Plugins: Services2, Startups, CertificateInfo, SignatureInfo, LineBreakInfo - Download-Mirror
ig88
Junior Member
Junior Member
Posts: 5
Joined: 2021-12-14, 20:13 UTC

Re: Set to default: Copy NTFS Permissions

Post by *ig88 »

Forgot to mention, but yes, manually ticking "Copy NTFS Permissions" worked flawlessly. I just want to see if I can make that the default setting (that box is pre-selected) in TC.
ig88
Junior Member
Junior Member
Posts: 5
Joined: 2021-12-14, 20:13 UTC

Re: Set to default: Copy NTFS Permissions

Post by *ig88 »

Regarding ability to select Copy NTFS permissions by default: Does it exist?

If it does not, is it on the radar to get added?

I'm certainly willing to discuss paying for the addition of that ability.
User avatar
Horst.Epp
Power Member
Power Member
Posts: 6951
Joined: 2003-02-06, 17:36 UTC
Location: Germany

Re: Set to default: Copy NTFS Permissions

Post by *Horst.Epp »

Currently there is no Ini-File option to make "Copy NTFS permissions" the default.
Wait for an answer from Christian.
Windows 11 Home, Version 24H2 (OS Build 26100.3915)
TC 11.51 x64 / x86
Everything 1.5.0.1391a (x64), Everything Toolbar 1.5.2.0, Listary Pro 6.3.2.88
QAP 11.6.4.2.1 x64
silverqx
New Member
New Member
Posts: 1
Joined: 2024-09-03, 15:33 UTC

Re: Set to default: Copy NTFS Permissions

Post by *silverqx »

I'm missing this feature too, I would prefer to have this checkbox checked by default and uncheck it when needed. 😁
User avatar
ghisler(Author)
Site Admin
Site Admin
Posts: 50390
Joined: 2003-02-04, 09:46 UTC
Location: Switzerland
Contact:

Re: Set to default: Copy NTFS Permissions

Post by *ghisler(Author) »

You can create a button for cm_copy, it now supports parameters:

From the help file:
All the options shown in the dialog box can be passed as parameters (starting with a slash). Each of the checkbox options takes an optional parameter 1 or 0, e.g. V0 turns off verify if it was enabled before.
P: Copy NTFS permissions.
V: Verify after copy
B0: Copy in foreground (even when AlwaysCopyInBackground is set in wincmd.ini)
B1: Copy in background (like F5-Enter-Background)
B2: Copy in background transfer manager
O0..9: Overwrite options, numbers as in the dialog box
R: Preserve relative paths when copying from branch view (R or R1=yes, R0=no)
S: Skip all which cannot be opened for reading
H: Overwrite/delete hidden/system/read only files. Warning: H0 (warn if attribute present) will NOT re-enable confirmation if it was disabled in Configuration - Options - Misc for read only and/or hidden/system files.
A: Copy to all selected folders in the target panel
G: Go: Start copying immediately
T="path": Target path, MUST be put in double quotes, and end with a backslash if a directory, or with a file mask with wildcards to rename files
W="wildcards": Copy only files of this type.
Note: If you need double quotes around the wildcards, you need to put them in double quotes twice
Example: cm_Copy /V0H1T="c:\test\"W="""a test.*"" test2.*"
Author of Total Commander
https://www.ghisler.com
Post Reply