Mysterious 'Device or resource busy" message

5,611

Solved it!!! (sorry for the inconvenience / wasting your time).

The problem only occurs when the destination directory has the same name as the source directory except for capitalization of one or more of its characters.

Since Windows is case-insensitive, the Windows share side refuses to do this move since it would imply a mv 'into itself.' Works fine when you make just a single character change. Duh!

Share:
5,611
Rene
Author by

Rene

Updated on September 18, 2022

Comments

  • Rene
    Rene almost 2 years

    I have succesfully mounted a windows share on linux with the command:

    mount -t cifs -o credentials=pat_to_windows_creds,uid=my_linux_login,gid=my_linux_login,vers=2.1 windows_share mount_point
    

    (the 'vers=2.1' is there since a few weeks because for some reason or other I cannot mount with the latest samba version)

    I can create and delete files and directories from Linux just fine. However, when I try moving (renaming) a directory, I get a starnge 'resource busy' error. Look:

    >mkdir foo
    >mv foo FOO
    mv: cannot move 'foo' to 'FOO/foo': Device or resource busy
    

    Why would Linux think that I have a directory FOO into which I want to move foo? I do not have a FOO directory (I checked). This exact same problem occurs for any and all other directories I try to rename. The problem ONLY occurs when I do this on the mounted Windows share; it does not occur on native/local files.

  • Kamil Maciorowski
    Kamil Maciorowski over 6 years
    It looks like you have created at least three different accounts, each one unregistered. You may want to properly register and then merge the accounts.