[Samba] smbclient, cannot delete non-empty directory, no error message

Jeremy Allison jra at samba.org
Fri Jan 5 18:58:57 UTC 2018


On Fri, Jan 05, 2018 at 11:15:54AM -0700, Chris Murphy via samba wrote:
> On Fri, Jan 5, 2018 at 6:37 AM, lingpanda101 <lingpanda101 at gmail.com> wrote:
> 
> >     I would assume you would need to use 'rm -r' to remove a directory and
> > it's contents.
> 
> That doesn't work and the man page doesn't list flags for any
> commands, plus it looks like rm is strictly for files not for
> directories.
> 
> smb: \noperms\> rm -r test1
> NT_STATUS_NO_SUCH_FILE listing \noperms\-r
> 
> smb: \noperms\> rm test2
> NT_STATUS_NO_SUCH_FILE listing \noperms\test2
> 
> 
> >I would also assume a error message would be expected with
> > 'rmdir' if the dir was not empty.
> 
> This is a problem for gvfs-smb backend for GNOME which uses rmdir. Due
> to the silent failure, gvfs-smb assumes it succeeds, but it doesn't.
> gvfs-smb uses libsmbclient and so it really needs an error message to
> know that the command did not succeed and that it needs to fall back
> on other commands to complete the user action.
> 
> Basically right now GNOME users can't delete directories that have
> files in them, that's pretty remarkable and not in a good way.
> 
> Should I file a bug? This problem goes back over a year at the least,
> I'm rather surprised no one has run into this until now.

Yes, please file a bug at bugzilla.samba.org.



More information about the samba mailing list