Jump to content
  • WINDOWS 10: The Action Cannot Be Completed Because The Folder Or File Is Open In Another Program


    jlw_4049
    • Solved Urgent

    I have random errors when it comes to Windows 10 and SMB security shares. 

    I encode/move a lot of media around, I use windows 10 VM from UnRaid as well as my actual Windows 11 gaming machine to manipulate the files. 

    Randomly I'll get the error from windows the action cannot be completed because the folder or file is open in another program while trying to move/rename a folder/file that is in a secure share. This error pops up on both PC's so this is definitely not just a windows thing. This has to do with the share/smb security. 

    Temporarily I can go into the share and change the security from Secure/Private to Public. As soon as I change the security the file can immediately be moved/renamed on either the VM/Physical Window machine. 

    Additionally when this happens, I can use CLI/Krusader to rename/move the folder/file always regardless of share security.

    As far as I know my permissions are correct, the permissions for the folders/files definitely show correctly when I check them. Changing them to nobody/back makes no difference. The only thing that unlocks the file/folder is changing the share to Public OR rebooting both windows machines (this isn't really a good option as I have jobs running that sometimes takes days). 

    I was wondering if there was a known fix for this, a work around, or if someone can give me some insight on if I'm doing something wrong. 

    Thanks!

    If I use the command "samba restart" it'll instantly solve the issue. Additionally I can rename the folder from within UnRaid terminal or Krusador and it has no errors. 

    This is a random error, I can manipulate many files and move folders, but when it happens it happens. Only solution to fix it is to restart samba or reboot the machine. 

    UNRAID.png

    jlw-unraid-diagnostics-20221020-2327.zip




    User Feedback

    Recommended Comments

    Go to a command prompt and enter these commands:

    ulimit -Hn 80000
    
    ulimit -Sn 80000

     

    If that lets your system work, then add those commands to your "go" file so the hard and soft file limits will get set whenever you reboot.

     

    You have a lot of these messages in your log:
     

    Oct 17 12:47:01 jlw-unRaid  smbd[12066]:   synthetic_pathref: opening [downloads/FileBot/jre/legal/jdk.crypto.cryptoki/pkcs11wrapper.md] failed
    Oct 17 12:47:01 jlw-unRaid  smbd[12066]: [2022/10/17 12:47:01.591558,  0] ../../source3/smbd/files.c:1193(synthetic_pathref)

     

    Stop them by adding this to the smb-extra.conf:

    logging = 0

     

    If you are not using any MACs to access the shares, turn off "Enhanced macOS interoperability:" in SMB settings.

    • Upvote 1
    Link to comment

    I applied the commands. This problem is intermittent but does always eventually happen. So, I applied the commands/changes you suggested. Re-enabled private shares. 

    I'll try to re-produce the issue now.

    Before when I renamed a file/directory it hung for just a second when it did work. Now it's instant like it normally would be on a computer. So let's hope this solved the issue.

     

    Edited by jlw_4049
    Link to comment
    On 10/28/2022 at 4:18 PM, dlandon said:

    Yes.  Did you try the commands first to see if it solved your problem?

    So far, everything seems to be working as it should with the changes. I've not had any issues with the shares as of yet. I'll mark this as solved and re-post back here if something else comes up. I will have a lot more time to test this through out this week, but normally the issue would have happened by now. 

    So far everything has been working very smooth. I really appreciate the help!

    Do you think that it was the macos switch? Or the commands? 

    I did not change the defaults and installed UnRaid fresh, so if those are the defaults maybe they should be hard coded to off/changed to prevent any further edge cases like this when it comes to smb. 

    Link to comment


    Join the conversation

    You can post now and register later. If you have an account, sign in now to post with your account.
    Note: Your post will require moderator approval before it will be visible.

    Guest
    Add a comment...

    ×   Pasted as rich text.   Restore formatting

      Only 75 emoji are allowed.

    ×   Your link has been automatically embedded.   Display as a link instead

    ×   Your previous content has been restored.   Clear editor

    ×   You cannot paste images directly. Upload or insert images from URL.


  • Status Definitions

     

    Open = Under consideration.

     

    Solved = The issue has been resolved.

     

    Solved version = The issue has been resolved in the indicated release version.

     

    Closed = Feedback or opinion better posted on our forum for discussion. Also for reports we cannot reproduce or need more information. In this case just add a comment and we will review it again.

     

    Retest = Please retest in latest release.


    Priority Definitions

     

    Minor = Something not working correctly.

     

    Urgent = Server crash, data loss, or other showstopper.

     

    Annoyance = Doesn't affect functionality but should be fixed.

     

    Other = Announcement or other non-issue.

×
×
  • Create New...