简体   繁体   English

Robocopy-Windows权限(即使使用管理员也拒绝访问)

[英]Robocopy - Windows Permission (Access Denied even with Admin)

I need to move files from a server to another remote server. 我需要将文件从一台服务器移动到另一台远程服务器。 I've created the batch script below to do this: 我创建了以下批处理脚本来执行此操作:

@echo off
NET USE \\remote server\IPC$ /U:domain\Account password
robocopy D:\location to get files from\ \\remote server to move files to\ /E /XA:H /R:5 /W:1 /MOV /LOG:C:\robocopybackup.log
NET USE \\remote server\IPC$ /D

The weird thing is when I connect with the Admin or my account directly on the remote server, I can create/modify and delete files, however when I map to the remote server from the server I need to move the files frome with the Admin or my account I get an "Access Denied" error. 奇怪的是,当我直接在远程服务器上与Admin或帐户连接时,我可以创建/修改和删除文件,但是当我从服务器映射到远程服务器时,我需要使用Admin或我的帐户出现“访问被拒绝”错误。

I have checked the permissions and I definitely have the right permissions. 我已经检查了权限,并且我绝对拥有正确的权限。 Can anyone shed some light on this for me? 谁能为我阐明一下? Thanks in advance. 提前致谢。

Could be that although your NET USE command should authenticate your session, that you've not associated a drive mapping with the ROBOCOPY command. 可能是因为尽管您的NET USE命令应验证您的会话,但您尚未将驱动器映射与ROBOCOPY命令关联。 Try: NET USE D: \\remote server\\IPC$ /U:domain\\Account password ...so that the same drive you are using for the source during the copy has been mapped using the correct credentials. 尝试:NET USE D: \\ remote服务器\\ IPC $ / U:domain \\ Account密码...,以便使用正确的凭据映射复制期间用于源的同一驱动器。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM