Forum > Operating Systems

Get file/folder and their permissions on Windows

<< < (3/3)

ezlage:

--- Quote from: TRon on June 04, 2020, 01:57:58 am ---@ezlage,
Since (hidden) streams are a filesystem specific feature, you should be looking at NTFS documentation.

That m$ decided to make use of this feature is another matter, and yes it might be able to help you out as they had to implement provisions for that.

What is definitely not going to work, as already mentioned, is doing this across platforms. You might be able to get away with certain things as long as the platform is similar, but even then you have to deal with a lot of specifics (as already mentioned).

--- End quote ---

I will do as you suggested, TRon! Thank you!

ASBzone:

--- Quote from: ezlage on June 04, 2020, 12:54:01 am ---So, how a backup software works? I mean, I can start a backup right now and restore files, folders and permissions anywhere. I need to write something like this with Lazarus and FPC.

Thank you very much!

--- End quote ---

Backup software is capable of doing this only when the machines in question are from the same Active Directory domain.   If they aren't, there is no software which can make those permissions compatible at the destination.

As has been already mentioned, you can certainly store the SID and ACLs of the permissions on the "source" system using the Windows APIs, but whether or not you will be able to apply those permissions to the destination will depend on the AD forest/domain configuration/relationship.

ezlage:

--- Quote from: ASBzone on June 04, 2020, 04:37:41 am ---
--- Quote from: ezlage on June 04, 2020, 12:54:01 am ---So, how a backup software works? I mean, I can start a backup right now and restore files, folders and permissions anywhere. I need to write something like this with Lazarus and FPC.

Thank you very much!

--- End quote ---

Backup software is capable of doing this only when the machines in question are from the same Active Directory domain.   If they aren't, there is no software which can make those permissions compatible at the destination.

As has been already mentioned, you can certainly store the SID and ACLs of the permissions on the "source" system using the Windows APIs, but whether or not you will be able to apply those permissions to the destination will depend on the AD forest/domain configuration/relationship.

--- End quote ---

Good point, ASBzone!
Luckily, I won't need to restore outside my AD forest/domain. Thank you!

Navigation

[0] Message Index

[*] Previous page

Go to full version