-   Linux - Server (
-   -   Problems using robocopy to copy to a samba share. (

osantos 03-16-2012 10:07 AM

Problems using robocopy to copy to a samba share.
Hello everyone, I have been fighting with this for a few days now, but can't seem to find the answer.

I have an Ubuntu server 11.10 with samba acting as a PDC.

I can use windows explorer to access the shared folders copy files, edit them, remove them, etc.

I now need to sync information from a windows computer to the samba share and when I runn the robocopy command:

robocopy origin destination /mir

I get an access denied message.

Strange enough If I use windows explorer to copy the same file for which the message is being shown, I can do it without a glitch, but robocopy seems to be trying something that the samba server denies.

Any idea of what it could be?

trickykid 03-16-2012 05:45 PM

What flags or options are you using during the copy?

osantos 03-20-2012 05:31 PM

O just use the /mir option

I tried coping only data but the error persists

jefro 03-20-2012 09:15 PM

Map the drive and use it that way.

osantos 03-21-2012 02:58 AM

I believe I already tried that. But I have tried so manythings that I guess it is worth double checking.

Will keep you posted

osantos 03-28-2012 04:23 PM

Maping the drive does not change anything
I tried maping the drive but the problem persists. It is really strange. Although I can not use robocopy or xcopy (i get an access denied error) by using the GUI I can remove and copy the files although I found out some strange behaviour:

- Some directories do not show the contents.
- If I try to copy the file from windows the copy process stalls for ever.

My clients are Windows 7 and the server is Ubuntu 11.10 running samba 3.5.11

I am starting to believe it is a windows 7/Samba incompatibility. I even did the required register changes in the windows clients.

I might have to buy a windows server to replace the ubuntu. :banghead:

brak44 03-28-2012 04:47 PM

Whatever you do don't go backwards to windows server.
Windows explorer is unreliable for large data copying.

I recently used robocopy to copy about 130G to a samba share with no problems whatsoever but this was with a Centos 6.2 64 bit server.
robocopy source destination /E /XC /XN /XO /R:3 /W:10

In your circumstance I'd try copying the data to a NTFS formatted USB drive first as an intermediate step.
Ensure that your Ubuntu supports ntfs.

osantos 03-29-2012 02:41 AM

Problem is not just with robocopy
The problem I have is that my problem is not just with robocopy... It is also exhibiting some other strange behaviour. For example, there is one subdirectory in one of my samba shared resources that although it has files in it it does not show its contents when accessing it through samba.

Al toguether the behavious is unreliable. I suspect that Windows 7 and Samba do not work wll toguether for some reason.

I don't know what else to try and I must provide an answer to my customer somehow.

My hope was that if I fixed the issue with robocopy I would probably be fixing the other issues too.

We are running an application that relies on the samba shares for database storage and the fact that it is not working reliable it is causing me problems. In order to operate we are now using one of the windows 7 clients as server for the other PC.

Best regards

osantos 03-29-2012 08:34 AM

Samba with Windows 7 clients
Does anyone have a samba installation with windows 7 clients? What about acting as a PDC?

Best regards

jasem200 02-03-2015 04:33 AM

use /SEC option with all others mentioned something like this
/MIR /B /W:0 /R:0 /NP /V /TEE /SEC

All times are GMT -5. The time now is 09:17 PM.