XCOPY deployment -- security failure: "File creation error..."

  • Thread starter Thread starter matt
  • Start date Start date
M

matt

hello,

i am attempting to deploy my local machine's files to a shared
folder on the production machine, elsewhere on the network. here is my
xcopy .bat:

SET SERVERPATH=\\SomeMachine\SomeShare\myProject

ECHO.
ECHO.
ECHO double-check path:
ECHO.
ECHO %SERVERPATH%\
ECHO.
PAUSE

xcopy D:\projects\myProject %SERVERPATH%\_code /e /k /r /o /h /i /d
/y /exclude:deploy_excludes.txt

....this works when testing w/ a local path, but fails on the production
machine w/ the following:

File creation error - This security ID may not be assigned as the
owner of this object.

Unable to create directory - \\SomeMachine\SomeShare\myProject

can anyone help me figure out what this means, and how to fix it?

for debugging i set the network share's permissions to allow "Everyone"
full control. i have no trouble copying the same files over via Windows
Explorer (my local workstation, to the network share's folder).

why would the xcopy fail? does it run under a different process than me
using Windows Explorer? is some sort of impersonation needed?


thanks!
matt
 
Hello

I have had several strange situations with UNC Paths.
To solve that, i assigned a temporary drive letter for copy-jobs.

For Your case, please try that:
net use T: %serverpath%


Greetings
Carsten
 
Here's some things to try:

- Try adding quotes around the paths in case any contain spaces and cmd.exe
is parsing the parameters differently than what you would expect:
xcopy "D:\projects\myProject" "%SERVERPATH%\_code"

- Try removing parameters from xcopy, make it simpler to troubleshoot. For
example, these are different than what you get with explorer.exe: "/o" and
"/exclude:deploy_excludes.txt"

- Try looking at the Security event log on the server, you may need to
enable auditing on both the share and the parent folder.
 
hello,

same error: "This security ID may not be assigned as the owner of this
object". it seems to be saying that the XCOPY process does not have
permission to copy the files.

im not an expert on windows processes. im not sure if i can either a)
have the XCOPY process impersonate me, or b) grant permissions on the
server to whatever system account XCOPY uses.


matt
 
Any processes that you launch (including xcopy.exe) will automatically run
under your user account/credentials. You would need to perform extra steps
to cause it to run with different credentials.

Are you scheduling it to run with a tool like at.exe or something other than
just launching it from cmd.exe (which includes batch files)?
 
Marty said:
Any processes that you launch (including xcopy.exe) will automatically run
under your user account/credentials.

thats good to know. but it makes it more of a mystery.
Are you scheduling it to run with a tool like at.exe or something other than
just launching it from cmd.exe (which includes batch files)?

no, no scheduling or anything. its just a .bat file that i run when i
want to push my stuff out. double-clicking in explorer, havent tried
running it from cmd. will try that tontie.


matt
 
Marty said:
- Try adding quotes around the paths in case any contain spaces and cmd.exe
is parsing the parameters differently than what you would expect:
xcopy "D:\projects\myProject" "%SERVERPATH%\_code"

i do not believe that is an issue. no spaces in my paths. and, it works
just fine locally.

- Try removing parameters from xcopy, make it simpler to troubleshoot. For
example, these are different than what you get with explorer.exe: "/o" and
"/exclude:deploy_excludes.txt"

i dont think the /exclude is doing it, because thats simply excluding
files from the source (my end). this error seems to be related to write
errors on the destination (the server). /o could be related, tho... i
will try this.

- Try looking at the Security event log on the server, you may need to
enable auditing on both the share and the parent folder.

....this is probably going to be required. just wish i had access to the
box (other than my share).. gotta jump thru some hoops.


thanks
matt
 
Back
Top