GCFA · Question #287
Which of the following switches of the XCOPY command copies file ownerships and NTFS permissions on files while copying the files?
The correct answer is D. /o. The XCOPY /O switch preserves file ownership information and NTFS discretionary access control lists (DACLs) when copying files. Without this switch, copied files inherit the permissions of the destination folder.
Question
Which of the following switches of the XCOPY command copies file ownerships and NTFS permissions on files while copying the files?
Options
- A/r
- B/p
- C/s
- D/o
How the community answered
(28 responses)- A4% (1)
- B7% (2)
- C14% (4)
- D75% (21)
Why each option
The XCOPY /O switch preserves file ownership information and NTFS discretionary access control lists (DACLs) when copying files. Without this switch, copied files inherit the permissions of the destination folder.
The /R switch allows XCOPY to overwrite destination files that have the read-only attribute set; it has no effect on copying ownership or NTFS permissions.
The /P switch causes XCOPY to prompt the user for confirmation before creating each destination file, and it does not copy or preserve permissions or ownership.
The /S switch causes XCOPY to copy directories and subdirectories (excluding empty ones), controlling directory traversal behavior rather than permission or ownership copying.
The /O switch instructs XCOPY to copy file ownership and NTFS ACL (Access Control List) information along with the file data. This is critical when migrating files between NTFS volumes and needing to preserve the original security descriptor, including both ownership and permission entries.
Concept tested: XCOPY switch for copying NTFS permissions and ownership
Source: https://learn.microsoft.com/en-us/windows-server/administration/windows-commands/xcopy
Topics
Community Discussion
No community discussion yet for this question.