The Samba-Bugzilla – Bug 10164
smbclient tar command missed remote directories,files
Last modified: 2013-09-24 09:08:12 UTC
Also seen in 3.6.9, I built 4.1.0rc3 to verify on a recent version.
When trying to replicate directories on Windows 7 machines onto Ubuntu directories and files are missing. Specifically within the following set, directory Pictures is fetched for user Daniella, but not for users Gerben and Gerben2.
smbclient \\\\mssql01\\Users -U backuppc%xxxxxxxxxx -E -d1 -TcX backup3.tar ./Gerben/AppData ./Gerben2/AppData ./Daniella/AppData ./Default/AppData > log3.txt 2>&1
Checking the tarfile just does not provide the directory for either Gerben or Gerben2. The logfile does not name this directory for those users (not even with -d10).
My guess building the file list within the tar command drops items.
When browsing the share interactively (smbclient \\\\mssql01\\Users -U backuppc%xxxxxxxxxx) the directories are shown, the directories can be accessed.
Probably due to NTUSER.DAT, and the fact that users were logged on to the Windows machine. When logged on file NTUSER.DAT is opened and blocked for access by any other program. When examining the logfile I could find a message (NT_STATUS_SHARING_VIOLATION) related to this file. Any files/directories following this file (alphabetical order) is voided, the parent directory is shown with the same message as the file (NT_STATUS_SHARING_VIOLATION).
The error should not be progressed to the parent directory, the directory should be continued to process.
Extract from the logfile:
NT_STATUS_ACCESS_DENIED listing \Gerben2\My Documents\*
NT_STATUS_ACCESS_DENIED listing \Gerben2\NetHood\*
NT_STATUS_SHARING_VIOLATION opening remote file \Gerben2\NTUSER.DAT (\Gerben2\)
NT_STATUS_SHARING_VIOLATION listing \Gerben2\*
NT_STATUS_ACCESS_DENIED listing \Public\*
tar: dumped 396 files and directories