H.S.Ramesh
2016-Nov-11 00:36 UTC
[Samba] Using smbclient to transfer files from a Linux system to a CIFS share
Hello, I have a script which utilizes smbclient to transfer files across to a CIFS shares from my Red Hat Linux 7.x servers on a daily basis. Mounting of CIFS shares work fine to transfer but this is for some reason not to be implemented. I have the following version of samba-client Loaded plugins: langpacks, product-id, rhnplugin, search-disabled-repos, subscription-manager This system is receiving updates from RHN Classic or Red Hat Satellite. Installed Packages Name : samba-client Arch : x86_64 Version : 4.4.4 Release : 9.el7 Size : 1.7 M Repo : installed>From repo : ramesh-clone-v7Summary : Samba client programs URL : http://www.samba.org/ License : GPLv3+ and LGPLv3+ Description : The samba-client package provides some SMB/CIFS clients to complement …… Unfortunately this was working fine to a 7Mode NetApp CIFS share and still works but does not work with any of the NetApp CDOT CIFS share . To test it manually it connect fine to the CIFS share However if I transfer files it transfers successfully any files below 64 kbytes but comes up with "cli_push returned NT_STATUS_INVALID_PARAMETER" when the files are bigger than this. When this error occurs it creates an empty/Null file with the same name at the CIFS share. Anyone come across this problem and if so what is the solution. You don't need a complete samba install just the smbclient install should be enough to test this. You can connect to the CIFS share from the Linux box using the following command #smbclient //CIFS_SERVER_NAME/CIFS_SHARE_NAME -U AD_Domain\\Username This will prompt for password smb: \> smb: \> put SMALL putting file SMALL as \SMALL (10128.9 kb/s) (average 10129.1 kb/s) smb: \> put BIG cli_push returned NT_STATUS_INVALID_PARAMETER putting file BIG as \BIG (86067.4 kb/s) (average 64973.9 kb/s) smb: \> File sizes 52K SMALL 1.1M BIG SMALL file is transferred successfully to the destination CIFS share BIG file just creates a null or empty file with the name BIG at the destination CIFS share location If you connect to a 7Mode NetApp FAS controller providing the CIFS share this works fine for any file sizes as shown below. smb: \> put SMALL putting file SMALL as \SMALL (405.2 kb/s) (average 405.2 kb/s) smb: \> put BIG putting file BIG as \BIG (6216.0 kb/s) (average 3834.5 kb/s) smb: \> Any help would be appreciated. Cheers, Ramesh
Volker Lendecke
2016-Nov-11 07:44 UTC
[Samba] Using smbclient to transfer files from a Linux system to a CIFS share
On Fri, Nov 11, 2016 at 08:36:00AM +0800, H.S.Ramesh via samba wrote:> Unfortunately this was working fine to a 7Mode NetApp CIFS share and still > works but does not work with any of the NetApp CDOT CIFS share .The sad fact is that NetApp does not support smbclient. So NetApp tends to implement exactly what Windows client request, not what Windows server could do, which is a very limited subset of SMB. You might want to send a network trace of the failing command, see https://wiki.samba.org/index.php/Capture_Packets for some info on how to do it. We *might* be able to help. Volker