I have small Linux server (Debian Squeeze) which runs a Samba server which is configured to share some folders with some windows machines. While trying to delete one of the directories from windows I received the 'Cannot delete folder' error.
We can use net share command to create, configure and delete network shares from command line. Below you can find syntax and examples for net share command. Create a network share from command line. The syntax for creating a share is as follows. Trying to copy the file from a hard drive on the windows pc INTO the unraid share through explorer.
I tried to delete the directory from the linux's console I got a similar error:
I listed the contents of the directory and found a file named .fuse_hidden followed by a hex number (000bd8c100000185).
I tried to delete the .fuse_hidden file, but a new file was created instantly (note the hex number change).
I also tried using Midnight Commander to delete the file with no success.
Other solutions I have found so far involve GUI and I've only got console.
Any suggestions are appreciated.
Lando
LandoLando
2 Answers
This is similar to what happens when you delete a file that another system has open on a NFS mount. The problem is that the file has been removed from the filesystem while its 'link count' was >1, meaning that other processes are still holding it open.
- Log in to the system where the file physically resides. (no network mount)
- Execute
lsof dir-name/.fuse_hidden000bd8c100000185
to find out what processes are holding the file handle open. - Terminate those processes if it makes sense to, or figure out what steps you can perform to 'gracefully' release the open file handle without terminating the process.
Normally, when you delete a file on your local filesystem that another process has open, the OS complies with your request and removes it from the directory tree, but the inode that tree points to is still considered in use by the operating system. Every time a file is opened, its 'link count' increments by one, and the space is only truly released when that link count hits zero.
When you run into a problem of this nature, it means that the OS has for whatever reason decided to not remove that file from the directory tree: usually because it has reason to believe that it still needs to be accessed by things that can't utilize the direct inode number. It might initially seem to comply, but behind the scenes the OS renames it to have a hidden dot-prefix so that is still accessible with some form of filesystem path addressing. The space will still be freed when the link count hits zero, but that object will will remain in the directory until the links are gone.
Andrew BAndrew B
I had the same problem. It was caused by a Python program for managing photos. After stopping it files '.fuse...' disappeared immediately.
GrumpaGrumpa
Not the answer you're looking for? Browse other questions tagged linuxconsolefusefilesdeleting or ask your own question.
Posted by8 months ago
Archived
How do I delete this share with no name that suddenly appeared?
Not entierly sure what lead to creation of this share. I have been having drive issues with a pairty drive failing. And have recently replaced that and added a new 5TB drive to the arry. All is functioning as intended but now I have just seen this ' ' share thats appeared that I have no control over and it seems to be exported/public share as well.
Would anyone be able to shed any light? My google skills within the forums and here has not found any usefull info.
86% Upvoted