LPC DPG
2020-Aug-21 10:25 UTC
[Samba] smbclient mask command seems not to work the same way with recurse ON for mget and mput
Dear folks. I am using smbclient 4.2.10 version (the one packaged for OEL 6, samba4-client-4.2.10-15.el6.x86_64), and observing a weird behaviour of the tool. I've got a Linux local directorio, say /tmp/eraseme, with a couple of subdirectories in it, say a and b, each one containing a dummy file, say a/AM.xls and b/AT.xls If I run: smbclient -d 30 -l /var/log/samba -m SMB3 -W "${d}" -U "${u}" "${s}" "${p}" smb: \> lcd /tmp/eraseme smb: \> recurse smb: \> prompt smb: \> mask *M.xls smb: \> mput * it transfer both AM.xls an AT.xls files, which seems not to agree what man page states: " mask <mask> This command allows the user to set up a mask which will be used during recursive operation of the mget and mput commands. The masks specified to the mget and mput commands act as filters for directories rather than files when recursion is toggled ON. The mask specified with the mask command is necessary to filter files within those directories. For example, if the mask specified in an mget command is "source*" and the mask specified with the mask command is "*.c" and recursion is toggled ON, the mget command will retrieve all files matching "*.c" in all directories below and including all directories matching "source*" in the current working directory. Note that the value for mask defaults to blank (equivalent to "*") and remains so until the mask command is used to change it. It retains the most recently specified value indefinitely. To avoid unexpected results it would be wise to change the value of mask back to "*" after using the mget or mput commands." Nonetheless, if I do it the other way around, smbclient -d 30 -l /var/log/samba -m SMB3 -W "${d}" -U "${u}" "${s}" "${p}" smb: \> lcd /tmp/eraseme smb: \> recurse smb: \> prompt smb: \> mask *M.xls smb: \> mget * , mget does seem to honour the referred description, downloading only AM.xls file to Linux. I have been looking in Google, but have seen no reference to similar problems. I do assume hence whether I am doing something wrong, or misinterpreting the manual, then I can't get it working. So I'd be really grateful if any of you who might have ever faced something similar could share the experience, as I am really lost with it. Thanks so much in advance. Best regards.
Rowland penny
2020-Aug-21 11:03 UTC
[Samba] smbclient mask command seems not to work the same way with recurse ON for mget and mput
On 21/08/2020 11:25, LPC DPG via samba wrote:> Dear folks. > > I am using smbclient 4.2.10 version (the one packaged for OEL 6, > samba4-client-4.2.10-15.el6.x86_64), and observing a weird behaviour of the > tool.Unless you are paying for support from oracle, OEL 6 dies in October and Samba 4.2 is very old, so, if there is a problem, you are unlikely to get it fixed. If you do have paid Oracle support, I suggest you ask them. If you do not, then I suggest you upgrade Oracle, this will get you a later version of Samba and if the problem is still there (it could have been fixed), then you stand a chance of getting it fixed by Samba. Which version to upgrade to will depend on whether you use openldap or not. If you do use openldap, then upgrade to version 7, otherwise I would go direct to version 8. Rowland
LPC DPG
2020-Aug-24 10:23 UTC
[Samba] smbclient mask command seems not to work the same way with recurse ON for mget and mput
Dear folks. Was hoping it had to do with the release, but have also tested in 4.4.16 and the issue is also there. I am aware a RHEL/CEntOS based upon 6 distribution is not the most up to date version I should test this on, as it also limits how easy is compiling most recent versions of Samba, but I assume though this is not a tricky test, and should work as documented in both 4.4 and 4.2 versions. Looking forward to reading your remarks. Many thanks in advance. Best regards. El vie., 21 ago. 2020 a las 12:25, LPC DPG (<lpcdpg at gmail.com>) escribi?:> Dear folks. > > I am using smbclient 4.2.10 version (the one packaged for OEL 6, > samba4-client-4.2.10-15.el6.x86_64), and observing a weird behaviour of the > tool. > > I've got a Linux local directorio, say /tmp/eraseme, with a couple of > subdirectories in it, say a and b, each one containing a dummy file, say > a/AM.xls and b/AT.xls > > If I run: > smbclient -d 30 -l /var/log/samba -m SMB3 -W "${d}" -U "${u}" "${s}" "${p}" > smb: \> lcd /tmp/eraseme > smb: \> recurse > smb: \> prompt > smb: \> mask *M.xls > smb: \> mput * > > it transfer both AM.xls an AT.xls files, which seems not to agree what man > page states: > > " mask <mask> > This command allows the user to set up a mask which will be > used during recursive operation of the mget and mput commands. > > The masks specified to the mget and mput commands act as > filters for directories rather than files when recursion is toggled ON. > > The mask specified with the mask command is necessary to filter > files within those directories. For example, if the mask specified in an > mget command is "source*" and the mask specified with the mask > command is "*.c" and recursion is toggled ON, the mget command will retrieve > all files matching "*.c" in all directories below and including > all directories matching "source*" in the current working directory. > > Note that the value for mask defaults to blank (equivalent to > "*") and remains so until the mask command is used to change it. It retains > the most recently specified value indefinitely. To avoid > unexpected results it would be wise to change the value of mask back to "*" > after > using the mget or mput commands." > > Nonetheless, if I do it the other way around, > > smbclient -d 30 -l /var/log/samba -m SMB3 -W "${d}" -U "${u}" "${s}" "${p}" > smb: \> lcd /tmp/eraseme > smb: \> recurse > smb: \> prompt > smb: \> mask *M.xls > smb: \> mget * > > , mget does seem to honour the referred description, downloading only > AM.xls file to Linux. > > I have been looking in Google, but have seen no reference to similar > problems. I do assume hence whether I am doing something wrong, or > misinterpreting the manual, then I can't get it working. > > So I'd be really grateful if any of you who might have ever faced > something similar could share the experience, as I am really lost with it. > > Thanks so much in advance. Best regards. >
Rowland penny
2020-Aug-24 10:45 UTC
[Samba] smbclient mask command seems not to work the same way with recurse ON for mget and mput
On 24/08/2020 11:23, LPC DPG via samba wrote:> Dear folks. > > Was hoping it had to do with the release, but have also tested in 4.4.16 > and the issue is also there. I am aware a RHEL/CEntOS based upon 6 > distribution is not the most up to date version I should test this on, as > it also limits how easy is compiling most recent versions of Samba, but I > assume though this is not a tricky test, and should work as documented in > both 4.4 and 4.2 versions. > > Looking forward to reading your remarks.Well, it probably should work as documented, but if it doesn't, you have absolutely no chance of getting it fixed, OEL6, RHEL6, Scientific Linux6 and Centos6 all die in October. Samba 4.4.6 went EOL nearly 3 years ago. I suggest you upgrade your OS, which will also upgrade Samba. If the Samba version you end up with is >= 4.10.x (very shortly to be 4.11.x) then if you still have a problem, Samba will try to fix it, any earlier version relies on the distro fixing it. The thing is, your problem may have been found and fixed in a later Samba version. Rowland
LPC DPG
2020-Aug-24 12:48 UTC
[Samba] smbclient mask command seems not to work the same way with recurse ON for mget and mput
A new update. Same behaviour with 4.6.16. Exact issue as Bug 1249. Many thanks. Kind regards. El lun., 24 ago. 2020 a las 12:23, LPC DPG (<lpcdpg at gmail.com>) escribi?:> Dear folks. > > Was hoping it had to do with the release, but have also tested in 4.4.16 > and the issue is also there. I am aware a RHEL/CEntOS based upon 6 > distribution is not the most up to date version I should test this on, as > it also limits how easy is compiling most recent versions of Samba, but I > assume though this is not a tricky test, and should work as documented in > both 4.4 and 4.2 versions. > > Looking forward to reading your remarks. > > Many thanks in advance. Best regards. > > El vie., 21 ago. 2020 a las 12:25, LPC DPG (<lpcdpg at gmail.com>) escribi?: > >> Dear folks. >> >> I am using smbclient 4.2.10 version (the one packaged for OEL 6, >> samba4-client-4.2.10-15.el6.x86_64), and observing a weird behaviour of the >> tool. >> >> I've got a Linux local directorio, say /tmp/eraseme, with a couple of >> subdirectories in it, say a and b, each one containing a dummy file, say >> a/AM.xls and b/AT.xls >> >> If I run: >> smbclient -d 30 -l /var/log/samba -m SMB3 -W "${d}" -U "${u}" "${s}" >> "${p}" >> smb: \> lcd /tmp/eraseme >> smb: \> recurse >> smb: \> prompt >> smb: \> mask *M.xls >> smb: \> mput * >> >> it transfer both AM.xls an AT.xls files, which seems not to agree what >> man page states: >> >> " mask <mask> >> This command allows the user to set up a mask which will be >> used during recursive operation of the mget and mput commands. >> >> The masks specified to the mget and mput commands act as >> filters for directories rather than files when recursion is toggled ON. >> >> The mask specified with the mask command is necessary to >> filter files within those directories. For example, if the mask specified >> in an >> mget command is "source*" and the mask specified with the mask >> command is "*.c" and recursion is toggled ON, the mget command will retrieve >> all files matching "*.c" in all directories below and >> including all directories matching "source*" in the current working >> directory. >> >> Note that the value for mask defaults to blank (equivalent to >> "*") and remains so until the mask command is used to change it. It retains >> the most recently specified value indefinitely. To avoid >> unexpected results it would be wise to change the value of mask back to "*" >> after >> using the mget or mput commands." >> >> Nonetheless, if I do it the other way around, >> >> smbclient -d 30 -l /var/log/samba -m SMB3 -W "${d}" -U "${u}" "${s}" >> "${p}" >> smb: \> lcd /tmp/eraseme >> smb: \> recurse >> smb: \> prompt >> smb: \> mask *M.xls >> smb: \> mget * >> >> , mget does seem to honour the referred description, downloading only >> AM.xls file to Linux. >> >> I have been looking in Google, but have seen no reference to similar >> problems. I do assume hence whether I am doing something wrong, or >> misinterpreting the manual, then I can't get it working. >> >> So I'd be really grateful if any of you who might have ever faced >> something similar could share the experience, as I am really lost with it. >> >> Thanks so much in advance. Best regards. >> >
Reasonably Related Threads
- smbclient mask command seems not to work the same way with recurse ON for mget and mput
- smbclient mask command seems not to work the same way with recurse ON for mget and mput
- smbclient mask command seems not to work the same way with recurse ON for mget and mput
- smbclient mask command seems not to work the same way with recurse ON for mget and mput
- smbclient mask command seems not to work the same way with recurse ON for mget and mput