Lars007
asked on
Windows 7, xcopy to samba share "Access denied"
Hi,
I am trying to xcopy a directory tree from a local drive to a Samba share, but I am getting "Access denied. Unable to create directory." I have read & write access to the Samba share in question (as well as the proper underlying Linux permissions).
Let me give more details by example:
xcopy d:\bup\SomeDir SomeDir /e/s/h/k/r/c
Access denied
Unable to create directory - G:\all\SomeDir
0 File(s) copied
But the top level directory does get created (but nothing else):
G:\all>dir SomeDir
Volume in drive G is groups
Volume Serial Number is 800A-0BF7
Directory of G:\all\SomeDir
12/31/2009 06:50 PM <DIR> .
12/31/2009 06:50 PM <DIR> ..
0 File(s) 0 bytes
2 Dir(s) 57,038,340,096 bytes free
If I perform the exact same operation from a Windows XP machine, logged in as the same exact user, it works just fine (I've used this command to backup and restore directories for more years than I care to remember).
If I use Explorer to drag the directory to the network share instead, it works fine. But I would much rather use the command line for this (and it should work!). I looked at the switches for xcopy to see if there were any changes in Windows 7 version that could cause this, but did not see any that stood out as a potential culprit.
Samba server:
CentOS 3.9, kernel 2.4.21-47.0.1.ELsmp
samba-3.0.9-1.3E.16
Windows workstation:
Windows 7 64 bit.
Any idea of what would be causing this issue?
Thanks,
Lars
Ps. I realize CentOS 3.9 and samba-3.0.9 are old, but I do not have the choice of upgrading this particular server.
I am trying to xcopy a directory tree from a local drive to a Samba share, but I am getting "Access denied. Unable to create directory." I have read & write access to the Samba share in question (as well as the proper underlying Linux permissions).
Let me give more details by example:
xcopy d:\bup\SomeDir SomeDir /e/s/h/k/r/c
Access denied
Unable to create directory - G:\all\SomeDir
0 File(s) copied
But the top level directory does get created (but nothing else):
G:\all>dir SomeDir
Volume in drive G is groups
Volume Serial Number is 800A-0BF7
Directory of G:\all\SomeDir
12/31/2009 06:50 PM <DIR> .
12/31/2009 06:50 PM <DIR> ..
0 File(s) 0 bytes
2 Dir(s) 57,038,340,096 bytes free
If I perform the exact same operation from a Windows XP machine, logged in as the same exact user, it works just fine (I've used this command to backup and restore directories for more years than I care to remember).
If I use Explorer to drag the directory to the network share instead, it works fine. But I would much rather use the command line for this (and it should work!). I looked at the switches for xcopy to see if there were any changes in Windows 7 version that could cause this, but did not see any that stood out as a potential culprit.
Samba server:
CentOS 3.9, kernel 2.4.21-47.0.1.ELsmp
samba-3.0.9-1.3E.16
Windows workstation:
Windows 7 64 bit.
Any idea of what would be causing this issue?
Thanks,
Lars
Ps. I realize CentOS 3.9 and samba-3.0.9 are old, but I do not have the choice of upgrading this particular server.
ASKER
No, "/E/T" is to create the directory structure *without* copying any files (and it gives the same access denied error). "/E/S" are the proper switches to create the directory structure as well as copy the files.
Lars
Lars
ASKER CERTIFIED SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
I've had problems before on a domain when I do not create the directory structure "beforehand".... The problems only happen the first time, once the directory structure is in place it works great.
I'm glad to hear you solved the problem on your side....
Bits...
I'm glad to hear you solved the problem on your side....
Bits...
I am not sure if you can run it followed by the rest of the switches and if it will copy the files if run with the rest of the switches. I haven't tested it but I suppose it should otherwise you should be able to create a batch file with something like:
xcopy d:\bup\SomeDir /T /E
xcopy d:\bup\SomeDir SomeDir /e/s/h/k/r/c