XCOPY in XP

P

Paul

I have a batch file that uses XCOPY to move files from one
machine to another.

I have permissions set on a windows 2003 shared directory
that allow a certain AD group to move files here, but not
to delete them or overwrite them.

the line in the batch file looks like this

xcopy c:\source \\machine1\source\ /s /e

The c:\source directory has sub directories undeer it
where the files are, They move into a mathing directory
under the source directory on machine1.

Everything has been working fine with the win98 machines
moving files to the windows 2003 server, but when I
changed one of the win98 machines to XP Pro, I can no
longer move files to the 2003 server machine, I get
a 'Access denied' error.

But I can use explorer to move the files to machine1. and
using explorere the permissions work correctly, meaning I
can copy the files to machine1 but can't delete or
overwrite them.

The 'access denied' only occurs when I use XCOPY in the
batch file or at a command prompt.

If I set the shared directory permissions to FULL for the
group in question, then the batch file works. But when
using explorer to copy the files the permissions work
correctly when set in their restrictive mode.

any ideas

Paul
 
R

Rob Schneider

Paul said:
I have a batch file that uses XCOPY to move files from one
machine to another.

I have permissions set on a windows 2003 shared directory
that allow a certain AD group to move files here, but not
to delete them or overwrite them.

the line in the batch file looks like this

xcopy c:\source \\machine1\source\ /s /e

The c:\source directory has sub directories undeer it
where the files are, They move into a mathing directory
under the source directory on machine1.

Everything has been working fine with the win98 machines
moving files to the windows 2003 server, but when I
changed one of the win98 machines to XP Pro, I can no
longer move files to the 2003 server machine, I get
a 'Access denied' error.

But I can use explorer to move the files to machine1. and
using explorere the permissions work correctly, meaning I
can copy the files to machine1 but can't delete or
overwrite them.

The 'access denied' only occurs when I use XCOPY in the
batch file or at a command prompt.

If I set the shared directory permissions to FULL for the
group in question, then the batch file works. But when
using explorer to copy the files the permissions work
correctly when set in their restrictive mode.

any ideas

Paul


Paul,

This puzzles me. I have no problem using xcopy as you describe. I even
did some Google searches to see if I could spot something, but can't.

Clearly the XP version of xcopy behaves differently with Active
Directory and Windows 2003 server than the 98 version did. I can't find
anything documented about that, but that doesn't mean it's not documented.

I re-read your note. I'm wondering what you mean when you say:
I have permissions set on a windows 2003 shared directory
that allow a certain AD group to move files here, but not
to delete them or overwrite them.

What do you mean that you prevent "overwrite"? I'm not familiar if
Active Directory has other permissions, but XP, the permissions are:
Fully Control, Modify, Read and Execute, List Folder Contents, Read, and
Write. How are you preventing "overwrite"? What does "overwrite" mean
in the context of the official permissions setup for XP. Windows 2003
and/or Active Directory different?
 
P

Paul

I may have mis spoke when I mentioned overwrite, but that
was the result of the permissions I set.

In my server 2003 AD I have a group named 'Scan'.
On a 2003 server machine I have a shared directory with
the followoing permission settings:

Sharing Tab > Permissions button: Everyone has change and
Read permission.

Security Tab > I've added the 'Scan' group to the groups
or user names list box. and checked the boxes for 'Read &
Execute', 'List folder Contents' & 'Read'.

I then click the advanced button. under Permissions tab >
Permissions entries I select the 'Scan' group and click
edit. I then deny the following permissions.

Create Folders / Append Data
Write Attriutes
Write extended attributes
Delete Subfolders and files
delete

This creates 2 entries for the 'Scan' group under the
permissions entries list 1 for deny and 1 for allow.


when I use XCOPY in my batch file from a windows 98
machine all the files move ok. If I try to execute the
batch file again and move those same files, the files will
not overwrite a file with the same name on the destination
machine, or give you the option to overwrite it. you just
get a permission denied message. This works perfect for
what we are doing. That is what I meant by overwrite, the
net effect of the permissions I set caused those logged in
as memebers of the 'Scan' group to not be able to move a
file with the smae name to the server.

I have done a test on 2 XP machines and they act the same.

Basically I set up a shared directory with child
directories on a 2003 server named 'img1' like this

Images > Scan2003 > M10 > SanAntonio > 20

I then set up a directory structure on a XP machine like
this

Scan > SanAntonio > 20

I place the files in the '20' folder (in reality we have
folders under SanAntonio from 1 to 31 for each day of the
month) and execute this line on the XP machine:


xcopy c:\scan\sanantonio \\IMG1\Images\Scan2003\M10
\Sanantonio\ /s /e

This moves files from the folders named 1 to 31 from the
source machine to the same folder on the server(1 to 31)

With the permissions I detailed above, this only works on
a win98 machine and gives me the denied error on a any XP
machine I try.

Sorry about the long explanation but I thought it might
help.
 
R

Rob Schneider

I've been giving this some thought ... haven't come up with any magic
thoughts except to say that I do believe it's caused by permissions, but
can't logically figure out which one (since works in 98 but no XP's
version XCOPY).

Suggest you, one at a time, delete the "deny" permissions, and see at
which point (if any) the xcopy process work. I'm wondering if XCOPY
needs one of these permissions. Two targets for testing this would be
"write attributes" and "write extended attributes".

Let us know how you get on if you chose to do this test.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Similar Threads


Top