Robocopy access denied, despite having Full Control?
Asked Answered
B

4

5

Pretty straightforward script:

ROBOCOPY \\servername\S$\SCCM2012\SCCMPackageSource\Files C:\Files /S /COPYALL /MIR /IS /LOG:C:\Copy.log

I can run this as administrator just fine, and all the files get copied correctly. However when I push this script to a computer as an Application via SCCM 2012 and run it, the log file gives me the following:

NOTE : NTFS Security may not be copied - Source may not be NTFS.
2016/07/27 10:05:31 ERROR 5 (0x00000005) Accessing Source Directory \\servername\S$\SCCM2012\SCCMPackageSource\Files\
Access is denied.

Both the SYSTEM account and the SCCM Network Access Account have Full Control over that folder. The folder is not shared. Tried with the /ZB switch as well, but that didn't make any difference. Any thoughts? Thanks!

Ballistics answered 27/7, 2016 at 8:12 Comment(2)
If you run the script locally on a remote server, are you allowed to use network paths instead of local paths?Galacto
To find out whether the problem is system account or sccm related you can use psexec and locally start a shell as the system account. Then you can execute the script in the same way the application would execute it in terms of rights but bypass all the complicated sccm stuffTomkins
B
2

Problem was resolved by Sharing the folder and giving Read access to the Everyone group.

Ballistics answered 28/7, 2016 at 10:48 Comment(2)
Sharing does not solve mineDeca
This doesn't seem like a good solution. I don't want everyone reading my files.Idolah
F
4

Add to robocopy parameter /NODCOPY - to not transfer parameters of file - it helped me.

Fluorosis answered 12/2, 2022 at 22:37 Comment(2)
This fixed my issue, but I don't like it. What does /NODCOPY actually do, and why does it work?Idolah
ERROR : Invalid Parameter #x : "/NODCOPY" - does not look like it does anything!Mayotte
B
2

Problem was resolved by Sharing the folder and giving Read access to the Everyone group.

Ballistics answered 28/7, 2016 at 10:48 Comment(2)
Sharing does not solve mineDeca
This doesn't seem like a good solution. I don't want everyone reading my files.Idolah
C
1

Ensure that both sharing permissions and security settings allow full control. Windows enforces whichever is the more conservative.

Cathe answered 11/3, 2021 at 15:22 Comment(0)
C
0

Found this result from google. If it help someone: Because of aborted (killed) robocopy process I had one folder with access denied. Even admins could not do anything with it (take ownership, open, delete, grant rights ...).

What solved our case was using checkdisk to repair the indexes. chkdsk /f f:

Catastrophe answered 25/11, 2021 at 15:36 Comment(0)

© 2022 - 2024 — McMap. All rights reserved.