Bug 1051 - smbclient: cannot do 'rm directoryname\filename'
smbclient: cannot do 'rm directoryname\filename'
Status: RESOLVED FIXED
Product: Samba 3.0
Classification: Unclassified
Component: smbclient
3.0.20b
All Linux
: P3 normal
: none
Assigned To: Gerald (Jerry) Carter
:
Depends on:
Blocks:
  Show dependency treegraph
 
Reported: 2004-02-08 20:30 UTC by SATOH Fumiyasu
Modified: 2005-10-13 08:44 UTC (History)
1 user (show)

See Also:


Attachments
libpcap data: Samba 3.0.2 server + smbclinet-3.0.2 -c 'del ddd\Makefile' (3.15 KB, application/octet-stream)
2004-02-11 23:49 UTC, SATOH Fumiyasu
no flags Details
libpcap data: Samba 3.0.2 server + smbclinet-2.2.8a -c 'del ddd\Makefile' (2.68 KB, application/octet-stream)
2004-02-11 23:50 UTC, SATOH Fumiyasu
no flags Details

Note You need to log in before you can comment on or make changes to this bug.
Description SATOH Fumiyasu 2004-02-08 20:30:52 UTC
smbclient 3.0.1 (NG):
----------------------
smb: \> mkdir ddd
smb: \> put file.test ddd\file.tmp
smb: \> ls ddd\file.tmp
  file.tmp                            A     5104  Tue Feb  3 19:28:59 2004

                65514 blocks of size 32768. 55598 blocks available
smb: \> del ddd\file.tmp
NT_STATUS_OBJECT_NAME_NOT_FOUND deleting remote file \file.tmp
smb: \> ls ddd\file.tmp
  file.tmp                            A     5104  Tue Feb  3 19:28:59 2004

                65514 blocks of size 32768. 55598 blocks available

smbclient 2.2.8a (OK):
-----------------------
smb: \> mkdir ddd
smb: \> put file.test ddd\file.tmp
smb: \> ls ddd\file.tmp
  file.tmp                            A     5104  Tue Feb  3 19:29:44 2004

                65514 blocks of size 32768. 55598 blocks available
smb: \> del ddd\file.tmp
smb: \> ls ddd\file.tmp
NT_STATUS_NO_SUCH_FILE listing \ddd\file.tmp

                65514 blocks of size 32768. 55598 blocks available
Comment 1 Gerald (Jerry) Carter 2004-02-10 20:03:35 UTC
looks like a server issue (not in the client code).
Tested using smbclienbt the SAMBA_3_0 and SAMBA_2_2
branches.
Comment 2 SATOH Fumiyasu 2004-02-11 23:44:23 UTC
No. Against Windows NT Server 4.0 SP6a or Samba 3.0.2 server, same 
problem is happend.
Comment 3 SATOH Fumiyasu 2004-02-11 23:49:20 UTC
Created attachment 399 [details]
libpcap data: Samba 3.0.2 server + smbclinet-3.0.2 -c 'del ddd\Makefile'
Comment 4 SATOH Fumiyasu 2004-02-11 23:50:08 UTC
Created attachment 400 [details]
libpcap data: Samba 3.0.2 server + smbclinet-2.2.8a -c 'del ddd\Makefile'
Comment 5 SATOH Fumiyasu 2004-07-13 02:46:37 UTC
In source/client/client.c:
The do_del() function uses cur_dir + finfo->name as a target
filename. But finfo->name has no directory name.
Comment 6 SATOH Fumiyasu 2004-07-13 03:10:09 UTC
There are other problems:

smb: \> ls
  .                     D        0  Tue Jul 13 19:03:43 2004
  ..                    D        0  Tue Jul  6 22:53:14 2004
  foo                   D        0  Tue Jul 13 19:03:38 2004
  bar                   D        0  Tue Jul 13 19:07:38 2004
  README                A     8534  Tue Jul 13 19:03:43 2004

                53223 blocks of size 524288. 3520 blocks available

smb: \> cd foo
smb: \foo\> del \README
NT_STATUS_NO_SUCH_FILE listing \foo\\README
smb: \foo\> altname \README
NT_STATUS_INVALID_PARAMETER getting alt name for \foo\\README
smb: \foo\> rmdir \bar
NT_STATUS_OBJECT_NAME_NOT_FOUND removing remote directory file \foo\\bar
Comment 7 Gerald (Jerry) Carter 2005-02-07 09:23:14 UTC
originally against 3.0.8pre1.
Comment 8 Gerald (Jerry) Carter 2005-10-13 08:44:03 UTC
Fixed for 3.0.21