Error message "Device or resource busy" when I try to delete a folder in a fileshare or the fileshare node itself. This errors appears depending the filesystem your fileshare is mounted on. Personnaly I use ncpfs (a kind of nfs for Novell).

I found a bug in the code of fileshare.module, but I don't know cvs. I post my solution here and I hope someone will introduce it in future releases.

Simply change the lines 595 - 596:
rmdir($filepath); // delete directory
closedir($handle);

Switching the order:
closedir($handle);
rmdir($filepath); // delete directory

The handle must be closed before the directory removed. Otherwise you risk a "Device or resource busy" error.

Comments

datatect’s picture

a fresh install of drupal-4.7.5 on debian sarge, only its the wrong directly. i am no pro.

i mv the folder from a /mnt/data/webroot/ folder to /var/www. this machine was set up by another. sites were in the former directory. no /html folder in /var/www. anyway the move worked but it leaves the old drupal-4.7.5 in /mnt/data/webroot/ and when i try to rm it i get:

rm: cannot remove `drupal-4.7.5/.nfs07abc0c600000001': Device or resource busy

is there a solution? others are also working on this machine with their stuff. i am a drupal fan.

help. thanks.

JamieR’s picture

Assigned:Unassigned» JamieR
Status:Active» Fixed
Anonymous’s picture

Status:Fixed» Closed (fixed)