[Samba] "Device or Resource Busy" when deleting folders

Louis Sabet louis at mobiles.co.uk
Fri Apr 11 09:52:08 GMT 2003

--On Thursday, April 10, 2003 14:39:36 +0100 Louis Sabet 
<louis at mobiles.co.uk> wrote:

> sudo mount -t smbfs -o
> quiet,fmask=0777,dmask=0777,credentials=$HOME/.credentials //homer/shared
> $HOME/Shared_Data sudo mount -t smbfs -o
> quiet,fmask=0777,dmask=0777,credentials=$HOME/.credentials //homer/$USER
> $HOME/.ntprofile sudo mount -t smbfs -o
> quiet,fmask=0777,dmask=0777,credentials=$HOME/.credentials
> //homer/$USER\prefs $HOME/.userprefs


> The real problem is when using GUI-based file managers. Again, MOST
> functions work - I can create files, directories etc, even delete files
> quite happily, but renaming files can cause problems (since some file
> managers attempt to re-set permissions), and deleting folders is an
> impossibility.
> As for the folder deletion error, using rmdir in a shell will work
> flawlessly. Using rm -Rf to delete a folder and its contents also works
> fine, but within the GUI, it fails with various generic non-specific
> errors. If I THEN try and delete the same folder in a shell, I get the
> following message:
> "Device or Resource Busy"
> IF the folder had files inside it, these files will have been deleted,
> but the folder itself will remain, and will refuse to delete for the
> duration of the session.
> Once the folders are unmounted, and remounted, issuing rmdir foldername
> or rm -Rf foldername works fine.

I haven't had any responses from the list yet, but here's an update just in 

Further testing has revealed that creating an empty directory, and then 
deleting it in the GUI apps works fine, so the problem appears to only 
affect folders containing files.

In addition, I checked whether creating a folder, creating a file within 
it, and then separately deleting that file and THEN the folder also causes 
the error, and it does. So it isn't just folders containing files, it's 
folders which HAVE at some point contained files during this particular 
session (by session I'm referring to the time that the folder is mounted - 
once unmounted and remounted, the folder can be deleted using the shell 
commands, but never the GUI app.).

I have also since tried using the mount command specifiying GID and UID, 
but other than changing the owner, this doesn't affect the behaviour of 
this particular problem (and I wouldn't expect it to, but it was worth a 

Any help would be greatly appreciated.

Best Regards


Louis Sabet - IT Manager

More information about the samba mailing list