- Remove From My Forums
Robocopy failure with Windows Server 2008 R2 — ERROR 1307 (0x0000051B) Copying NTFS Security to Destination
-
Question
-
I’m trying to copy a folder and files from one harddrive to another using the folowing robocopy options
robocopy E:Database_Backup Z:Database_Backup /B /COPYALL /S /MIR /MON:1
While run batch file i
get the following error:E:Database_Backup 2015/05/15 10:22:31 ERROR 1307 (0x0000051B) Copying NTFS Security to Destination Directory E:Database_Backup This security ID may not be assigned as the owner of this object.
Z: is Mapped network location and its Linux server
Platform: Windows Server 2008 R2
I have tried all the proposed solutions i could find, but non of work for me some one please kindly help to me solve this issue
Thanks
Answers
-
Hi Kuma,
According to your description, you used the cmd «robocopy» to copy folder between windows and linux, and mapped the shared folder on linux as Z:.
Based on my research, the shared folder permission is assigned to computer object, please try to temporarily assign the unrestricted permission on the destination in case the permission issue caused the error.
In addition, to use robocopy to copy folder bewteen windows and linux, please also go through this article, and choose the options of the «robocopy» based on the description:
How to use robocopy in Windows for backup and sync like rsync in Linux
If there is anything else regarding this issue, please feel free to post back.
Best Regards,
Anna Wang
Please remember to mark the replies as answers if they help and unmark them if they provide no help. If you have feedback for TechNet Support, contact tnmff@microsoft.com
-
Edited by
Monday, May 18, 2015 8:59 AM
-
Proposed as answer by
AnnaWY
Sunday, May 31, 2015 8:54 AM -
Marked as answer by
AnnaWY
Wednesday, June 3, 2015 6:32 AM
-
Edited by
I’m trying to copy a folder from one harddrive to another using the folowing robocopy options:
robocopy "H:Source" "T:target" /E /COPY:DATSO /R:1 /W:1 /DCOPY:T /Z /LOG:T:Belfirst_copy.log /NP
For files where the owner is not the Administrator, but some specific domain user, i get the following error:
ERROR 1307 (0x0000051B) Copying NTFS Security to Destination Directory T:target...(a lot of files/dirs)
This security ID may not be assigned as the owner of this object.
I have tried all the proposed solutions i could find:
- Give the Domain user i’m logged in with, and running the script as,
full access to the source, and target directory. - Give the Domain user
i’m logged in with, and running the script as, the «Restore files and
directories» priviledge. - Run as administrator
- Run as a bat file
- Log off and log on again and retry
- use the /B option
- Try without the /COPY:S option
For obvious reasons copying without the /COPY:O option solves the problem. But that beats the purpose of course.
What am i missing?
Platform: Windows Server 2008 R2
(This is highly related to «Robocopy failure with Windows Server 2008 Scheduled Task», but i don’t have enough reputation yet to add a comment there.)
asked Dec 5, 2013 at 16:01
1
Normally, you can only acquire NTFS ownership of filesystem objects for yourself. You cannot set the ownership to a third person. (This prevents users from e.g. storing compromising or incriminating data under the ownership of another, unsuspecting person.)
There is a «restore files and directories» privilege in the security policy. Microsoft states:
This security setting […] determines which users can set valid security principals as the owner of an object.
Apparently, you need this privilege to copy ownership. Robocopy must run in a security context that allows setting ownership to arbitrary principals.
By default, local administrators have this privilege:
By default, this right is granted to the Administrators, Backup Operators, and Server Operators groups on domain controllers, and to the Administrators and Backup Operators groups on stand-alone servers.
(The «restore files and directories» privilege is part of the policy. You may need to log off and on again for it to become effective.)
answered Feb 9, 2019 at 9:15
I also had this trouble. I wrote a batch file to robocopy the current logged in user and copy all his profile folder to a network shared location. Using variables and this combination of switches every folder copied without an errors. A command has to be created for each individual folder, but it works. You may have to give the user permission to create a folder in the network share, or create it prior to first time backup.
robocopy «%HOMEPATH%FOLDER» «SERVERNETWORK_SHARE%USERNAME%FOLDER» /s /mir /zb /b /copy:dat
answered Apr 8, 2014 at 15:15
- Remove From My Forums
Robocopy failure with Windows Server 2008 R2 — ERROR 1307 (0x0000051B) Copying NTFS Security to Destination
-
Question
-
I’m trying to copy a folder and files from one harddrive to another using the folowing robocopy options
robocopy E:Database_Backup Z:Database_Backup /B /COPYALL /S /MIR /MON:1
While run batch file i
get the following error:E:Database_Backup 2015/05/15 10:22:31 ERROR 1307 (0x0000051B) Copying NTFS Security to Destination Directory E:Database_Backup This security ID may not be assigned as the owner of this object.
Z: is Mapped network location and its Linux server
Platform: Windows Server 2008 R2
I have tried all the proposed solutions i could find, but non of work for me some one please kindly help to me solve this issue
Thanks
Answers
-
Hi Kuma,
According to your description, you used the cmd «robocopy» to copy folder between windows and linux, and mapped the shared folder on linux as Z:.
Based on my research, the shared folder permission is assigned to computer object, please try to temporarily assign the unrestricted permission on the destination in case the permission issue caused the error.
In addition, to use robocopy to copy folder bewteen windows and linux, please also go through this article, and choose the options of the «robocopy» based on the description:
How to use robocopy in Windows for backup and sync like rsync in Linux
If there is anything else regarding this issue, please feel free to post back.
Best Regards,
Anna Wang
Please remember to mark the replies as answers if they help and unmark them if they provide no help. If you have feedback for TechNet Support, contact tnmff@microsoft.com
-
Edited by
Monday, May 18, 2015 8:59 AM
-
Proposed as answer by
AnnaWY
Sunday, May 31, 2015 8:54 AM -
Marked as answer by
AnnaWY
Wednesday, June 3, 2015 6:32 AM
-
Edited by
- Remove From My Forums
Robocopy failure with Windows Server 2008 R2 — ERROR 1307 (0x0000051B) Copying NTFS Security to Destination
-
Question
-
I’m trying to copy a folder and files from one harddrive to another using the folowing robocopy options
robocopy E:Database_Backup Z:Database_Backup /B /COPYALL /S /MIR /MON:1
While run batch file i
get the following error:E:Database_Backup 2015/05/15 10:22:31 ERROR 1307 (0x0000051B) Copying NTFS Security to Destination Directory E:Database_Backup This security ID may not be assigned as the owner of this object.
Z: is Mapped network location and its Linux server
Platform: Windows Server 2008 R2
I have tried all the proposed solutions i could find, but non of work for me some one please kindly help to me solve this issue
Thanks
Answers
-
Hi Kuma,
According to your description, you used the cmd «robocopy» to copy folder between windows and linux, and mapped the shared folder on linux as Z:.
Based on my research, the shared folder permission is assigned to computer object, please try to temporarily assign the unrestricted permission on the destination in case the permission issue caused the error.
In addition, to use robocopy to copy folder bewteen windows and linux, please also go through this article, and choose the options of the «robocopy» based on the description:
How to use robocopy in Windows for backup and sync like rsync in Linux
If there is anything else regarding this issue, please feel free to post back.
Best Regards,
Anna Wang
Please remember to mark the replies as answers if they help and unmark them if they provide no help. If you have feedback for TechNet Support, contact tnmff@microsoft.com
-
Edited by
Monday, May 18, 2015 8:59 AM
-
Proposed as answer by
AnnaWY
Sunday, May 31, 2015 8:54 AM -
Marked as answer by
AnnaWY
Wednesday, June 3, 2015 6:32 AM
-
Edited by
Действительно звучит неопределенно связанным с аппаратными средствами — необычно, чтобы иметь живую систему (ядро очевидно все еще NATing), но многочисленные мертвые процессы — например, SSH и сквид. Я обвинил бы подозрения диск сам — когда я видел, что смузи делают этот вид приема (и я видел некоторых.. работа в SmoothWall для> 6 лет!) это имеет 9 раз из 10 связанных дисков.
задан
13 April 2017 в 05:14
Ссылка
2 ответа
Я также испытал эти затруднения. Я записал пакетный файл в robocopy, ток вошел в систему пользователь, и скопируйте всю его папку профиля в сетевой общий ресурс. Используя переменные и эту комбинацию переключателей каждая папка скопирована без ошибки. Команда должна быть создана для каждой отдельной папки, но она работает. Вам, вероятно, придется дать полномочия пользователя создать папку в сетевом ресурсе или создать его до первого раза резервное копирование.
robocopy «%HOMEPATH %FOLDER» «SERVERNETWORK_SHARE ИМЯ ПОЛЬЗОВАТЕЛЯ % %FOLDER»/s / Мир / zb/b/copy:dat
Ссылка
Обычно, можно только получить владение NTFS объектов файловой системы для себя. Вы не можете установить владение на третье лицо. (Это предотвращает пользователей от, например, хранящий идущие на компромисс или инкриминирующие данные под владением другого, не подозревающего человека.)
существует «восстановление файлы и каталоги» полномочие в политике безопасности. Состояния Microsoft :
Эта настройка безопасности […] определяет, какие пользователи могут установить допустимые принципалы безопасности как владелец объекта.
, По-видимому, Вам нужно это полномочие скопировать владение. Robocopy должен работать в контексте защиты, который позволяет устанавливать владение на произвольные принципалы.
По умолчанию, у локальных администраторов есть это полномочие:
По умолчанию, это право предоставляют Администраторам, Резервным Операторам и группам Операторов Сервера на контроллерах домена, и Администраторам и Резервным группам Операторов на автономных серверах.
(«Файлы восстановления и каталоги» полномочие является частью политики. Вы, возможно, должны выйти из системы и на снова, чтобы это вступило в силу.)
Ссылка
Теги
Похожие вопросы
I’m trying to copy a folder from one harddrive to another using the folowing robocopy options:
robocopy "H:Source" "T:target" /E /COPY:DATSO /R:1 /W:1 /DCOPY:T /Z /LOG:T:Belfirst_copy.log /NP
For files where the owner is not the Administrator, but some specific domain user, i get the following error:
ERROR 1307 (0x0000051B) Copying NTFS Security to Destination Directory T:target...(a lot of files/dirs)
This security ID may not be assigned as the owner of this object.
I have tried all the proposed solutions i could find:
- Give the Domain user i’m logged in with, and running the script as,
full access to the source, and target directory. - Give the Domain user
i’m logged in with, and running the script as, the «Restore files and
directories» priviledge. - Run as administrator
- Run as a bat file
- Log off and log on again and retry
- use the /B option
- Try without the /COPY:S option
For obvious reasons copying without the /COPY:O option solves the problem. But that beats the purpose of course.
What am i missing?
Platform: Windows Server 2008 R2
(This is highly related to «Robocopy failure with Windows Server 2008 Scheduled Task», but i don’t have enough reputation yet to add a comment there.)
windows-server-2008 filesystems robocopy
edited Apr 13 ’17 at 12:14
I’m trying to copy a folder from one harddrive to another using the folowing robocopy options:
robocopy "H:Source" "T:target" /E /COPY:DATSO /R:1 /W:1 /DCOPY:T /Z /LOG:T:Belfirst_copy.log /NP
For files where the owner is not the Administrator, but some specific domain user, i get the following error:
ERROR 1307 (0x0000051B) Copying NTFS Security to Destination Directory T:target...(a lot of files/dirs)
This security ID may not be assigned as the owner of this object.
I have tried all the proposed solutions i could find:
- Give the Domain user i’m logged in with, and running the script as,
full access to the source, and target directory. - Give the Domain user
i’m logged in with, and running the script as, the «Restore files and
directories» priviledge. - Run as administrator
- Run as a bat file
- Log off and log on again and retry
- use the /B option
- Try without the /COPY:S option
For obvious reasons copying without the /COPY:O option solves the problem. But that beats the purpose of course.
What am i missing?
Platform: Windows Server 2008 R2
(This is highly related to «Robocopy failure with Windows Server 2008 Scheduled Task», but i don’t have enough reputation yet to add a comment there.)
windows-server-2008 filesystems robocopy
edited Apr 13 ’17 at 12:14
1
I’m trying to copy a folder from one harddrive to another using the folowing robocopy options:
robocopy "H:Source" "T:target" /E /COPY:DATSO /R:1 /W:1 /DCOPY:T /Z /LOG:T:Belfirst_copy.log /NP
For files where the owner is not the Administrator, but some specific domain user, i get the following error:
ERROR 1307 (0x0000051B) Copying NTFS Security to Destination Directory T:target...(a lot of files/dirs)
This security ID may not be assigned as the owner of this object.
I have tried all the proposed solutions i could find:
- Give the Domain user i’m logged in with, and running the script as,
full access to the source, and target directory. - Give the Domain user
i’m logged in with, and running the script as, the «Restore files and
directories» priviledge. - Run as administrator
- Run as a bat file
- Log off and log on again and retry
- use the /B option
- Try without the /COPY:S option
For obvious reasons copying without the /COPY:O option solves the problem. But that beats the purpose of course.
What am i missing?
Platform: Windows Server 2008 R2
(This is highly related to «Robocopy failure with Windows Server 2008 Scheduled Task», but i don’t have enough reputation yet to add a comment there.)
windows-server-2008 filesystems robocopy
edited Apr 13 ’17 at 12:14
I’m trying to copy a folder from one harddrive to another using the folowing robocopy options:
robocopy "H:Source" "T:target" /E /COPY:DATSO /R:1 /W:1 /DCOPY:T /Z /LOG:T:Belfirst_copy.log /NP
For files where the owner is not the Administrator, but some specific domain user, i get the following error:
ERROR 1307 (0x0000051B) Copying NTFS Security to Destination Directory T:target...(a lot of files/dirs)
This security ID may not be assigned as the owner of this object.
I have tried all the proposed solutions i could find:
- Give the Domain user i’m logged in with, and running the script as,
full access to the source, and target directory. - Give the Domain user
i’m logged in with, and running the script as, the «Restore files and
directories» priviledge. - Run as administrator
- Run as a bat file
- Log off and log on again and retry
- use the /B option
- Try without the /COPY:S option
For obvious reasons copying without the /COPY:O option solves the problem. But that beats the purpose of course.
What am i missing?
Platform: Windows Server 2008 R2
(This is highly related to «Robocopy failure with Windows Server 2008 Scheduled Task», but i don’t have enough reputation yet to add a comment there.)
windows-server-2008 filesystems robocopy
windows-server-2008 filesystems robocopy
edited Apr 13 ’17 at 12:14
edited Apr 13 ’17 at 12:14
edited Apr 13 ’17 at 12:14
edited Apr 13 ’17 at 12:14
edited Apr 13 ’17 at 12:14
I also had this trouble. I wrote a batch file to robocopy the current logged in user and copy all his profile folder to a network shared location. Using variables and this combination of switches every folder copied without an errors. A command has to be created for each individual folder, but it works. You may have to give the user permission to create a folder in the network share, or create it prior to first time backup.
robocopy «%HOMEPATH%FOLDER» «SERVERNETWORK_SHARE%USERNAME%FOLDER» /s /mir /zb /b /copy:dat
answered Apr 8 ’14 at 15:15
Admin_Retro_RayAdmin_Retro_Ray
Normally, you can only acquire NTFS ownership of filesystem objects for yourself. You cannot set the ownership to a third person. (This prevents users from e.g. storing compromising or incriminating data under the ownership of another, unsuspecting person.)
There is a «restore files and directories» privilege in the security policy. Microsoft states:
This security setting […] determines which users can set valid security principals as the owner of an object.
Apparently, you need this privilege to copy ownership. Robocopy must run in a security context that allows setting ownership to arbitrary principals.
By default, local administrators have this privilege:
By default, this right is granted to the Administrators, Backup Operators, and Server Operators groups on domain controllers, and to the Administrators and Backup Operators groups on stand-alone servers.
(The «restore files and directories» privilege is part of the policy. You may need to log off and on again for it to become effective.)
Your Answer
StackExchange.ready(function() {
var channelOptions = {
tags: «».split(» «),
id: «2»
};
initTagRenderer(«».split(» «), «».split(» «), channelOptions);
StackExchange.using(«externalEditor», function() {
// Have to fire editor after snippets, if snippets enabled
if (StackExchange.settings.snippets.snippetsEnabled) {
StackExchange.using(«snippets», function() {
createEditor();
});
}
else {
createEditor();
}
});
function createEditor() {
StackExchange.prepareEditor({
heartbeatType: ‘answer’,
autoActivateHeartbeat: false,
convertImagesToLinks: true,
noModals: true,
showLowRepImageUploadWarning: true,
reputationToPostImages: 10,
bindNavPrevention: true,
postfix: «»,
imageUploader: {
brandingHtml: «Powered by u003ca class=»icon-imgur-white» href=»https://imgur.com/»u003eu003c/au003e»,
contentPolicyHtml: «User contributions licensed under u003ca href=»https://creativecommons.org/licenses/by-sa/3.0/»u003ecc by-sa 3.0 with attribution requiredu003c/au003e u003ca href=»https://stackoverflow.com/legal/content-policy»u003e(content policy)u003c/au003e»,
allowUrls: true
},
onDemand: true,
discardSelector: «.discard-answer»
,immediatelyShowMarkdownHelp:true
});
}
});
Sign up or log in
StackExchange.ready(function () {
StackExchange.helpers.onClickDraftSave(‘#login-link’);
});
Sign up using Email and Password
Post as a guest
Required, but never shown
StackExchange.ready(
function () {
StackExchange.openid.initPostLogin(‘.new-post-login’, ‘https%3a%2f%2fserverfault.com%2fquestions%2f559495%2ferror-1307-0x0000051b-while-copying-with-robocopy-none-of-the-known-sollut%23new-answer’, ‘question_page’);
}
);
Post as a guest
Required, but never shown
I also had this trouble. I wrote a batch file to robocopy the current logged in user and copy all his profile folder to a network shared location. Using variables and this combination of switches every folder copied without an errors. A command has to be created for each individual folder, but it works. You may have to give the user permission to create a folder in the network share, or create it prior to first time backup.
robocopy «%HOMEPATH%FOLDER» «SERVERNETWORK_SHARE%USERNAME%FOLDER» /s /mir /zb /b /copy:dat
answered Apr 8 ’14 at 15:15
Admin_Retro_RayAdmin_Retro_Ray
I also had this trouble. I wrote a batch file to robocopy the current logged in user and copy all his profile folder to a network shared location. Using variables and this combination of switches every folder copied without an errors. A command has to be created for each individual folder, but it works. You may have to give the user permission to create a folder in the network share, or create it prior to first time backup.
robocopy «%HOMEPATH%FOLDER» «SERVERNETWORK_SHARE%USERNAME%FOLDER» /s /mir /zb /b /copy:dat
answered Apr 8 ’14 at 15:15
Admin_Retro_RayAdmin_Retro_Ray
1
I also had this trouble. I wrote a batch file to robocopy the current logged in user and copy all his profile folder to a network shared location. Using variables and this combination of switches every folder copied without an errors. A command has to be created for each individual folder, but it works. You may have to give the user permission to create a folder in the network share, or create it prior to first time backup.
robocopy «%HOMEPATH%FOLDER» «SERVERNETWORK_SHARE%USERNAME%FOLDER» /s /mir /zb /b /copy:dat
answered Apr 8 ’14 at 15:15
Admin_Retro_RayAdmin_Retro_Ray
I also had this trouble. I wrote a batch file to robocopy the current logged in user and copy all his profile folder to a network shared location. Using variables and this combination of switches every folder copied without an errors. A command has to be created for each individual folder, but it works. You may have to give the user permission to create a folder in the network share, or create it prior to first time backup.
robocopy «%HOMEPATH%FOLDER» «SERVERNETWORK_SHARE%USERNAME%FOLDER» /s /mir /zb /b /copy:dat
answered Apr 8 ’14 at 15:15
Admin_Retro_RayAdmin_Retro_Ray
answered Apr 8 ’14 at 15:15
Admin_Retro_RayAdmin_Retro_Ray
answered Apr 8 ’14 at 15:15
Admin_Retro_RayAdmin_Retro_Ray
answered Apr 8 ’14 at 15:15
Admin_Retro_RayAdmin_Retro_Ray
Normally, you can only acquire NTFS ownership of filesystem objects for yourself. You cannot set the ownership to a third person. (This prevents users from e.g. storing compromising or incriminating data under the ownership of another, unsuspecting person.)
There is a «restore files and directories» privilege in the security policy. Microsoft states:
This security setting […] determines which users can set valid security principals as the owner of an object.
Apparently, you need this privilege to copy ownership. Robocopy must run in a security context that allows setting ownership to arbitrary principals.
By default, local administrators have this privilege:
By default, this right is granted to the Administrators, Backup Operators, and Server Operators groups on domain controllers, and to the Administrators and Backup Operators groups on stand-alone servers.
(The «restore files and directories» privilege is part of the policy. You may need to log off and on again for it to become effective.)
Normally, you can only acquire NTFS ownership of filesystem objects for yourself. You cannot set the ownership to a third person. (This prevents users from e.g. storing compromising or incriminating data under the ownership of another, unsuspecting person.)
There is a «restore files and directories» privilege in the security policy. Microsoft states:
This security setting […] determines which users can set valid security principals as the owner of an object.
Apparently, you need this privilege to copy ownership. Robocopy must run in a security context that allows setting ownership to arbitrary principals.
By default, local administrators have this privilege:
By default, this right is granted to the Administrators, Backup Operators, and Server Operators groups on domain controllers, and to the Administrators and Backup Operators groups on stand-alone servers.
(The «restore files and directories» privilege is part of the policy. You may need to log off and on again for it to become effective.)
0
Normally, you can only acquire NTFS ownership of filesystem objects for yourself. You cannot set the ownership to a third person. (This prevents users from e.g. storing compromising or incriminating data under the ownership of another, unsuspecting person.)
There is a «restore files and directories» privilege in the security policy. Microsoft states:
This security setting […] determines which users can set valid security principals as the owner of an object.
Apparently, you need this privilege to copy ownership. Robocopy must run in a security context that allows setting ownership to arbitrary principals.
By default, local administrators have this privilege:
By default, this right is granted to the Administrators, Backup Operators, and Server Operators groups on domain controllers, and to the Administrators and Backup Operators groups on stand-alone servers.
(The «restore files and directories» privilege is part of the policy. You may need to log off and on again for it to become effective.)
Normally, you can only acquire NTFS ownership of filesystem objects for yourself. You cannot set the ownership to a third person. (This prevents users from e.g. storing compromising or incriminating data under the ownership of another, unsuspecting person.)
There is a «restore files and directories» privilege in the security policy. Microsoft states:
This security setting […] determines which users can set valid security principals as the owner of an object.
Apparently, you need this privilege to copy ownership. Robocopy must run in a security context that allows setting ownership to arbitrary principals.
By default, local administrators have this privilege:
By default, this right is granted to the Administrators, Backup Operators, and Server Operators groups on domain controllers, and to the Administrators and Backup Operators groups on stand-alone servers.
(The «restore files and directories» privilege is part of the policy. You may need to log off and on again for it to become effective.)
Thanks for contributing an answer to Server Fault!
- Please be sure to answer the question. Provide details and share your research!
But avoid …
- Asking for help, clarification, or responding to other answers.
- Making statements based on opinion; back them up with references or personal experience.
To learn more, see our tips on writing great answers.
Sign up or log in
StackExchange.ready(function () {
StackExchange.helpers.onClickDraftSave(‘#login-link’);
});
Sign up using Email and Password
Post as a guest
Required, but never shown
StackExchange.ready(
function () {
StackExchange.openid.initPostLogin(‘.new-post-login’, ‘https%3a%2f%2fserverfault.com%2fquestions%2f559495%2ferror-1307-0x0000051b-while-copying-with-robocopy-none-of-the-known-sollut%23new-answer’, ‘question_page’);
}
);
Post as a guest
Required, but never shown
Sign up or log in
StackExchange.ready(function () {
StackExchange.helpers.onClickDraftSave(‘#login-link’);
});
Sign up using Email and Password
Post as a guest
Required, but never shown
Sign up or log in
StackExchange.ready(function () {
StackExchange.helpers.onClickDraftSave(‘#login-link’);
});
Sign up using Email and Password
Post as a guest
Required, but never shown
Sign up or log in
StackExchange.ready(function () {
StackExchange.helpers.onClickDraftSave(‘#login-link’);
});
Sign up using Email and Password
Sign up using Email and Password
Post as a guest
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown