FsLogix - Unclean logoff causing locked files until server reboot

Much R 71 Reputation points
2021-01-13T16:29:50.18+00:00

Problem is described by M4deman under unclean-logoff-causing-locked-files-until-server-reboot

It seems to have something to do with the 2009 version.
The latest version of FSLogix is installed whats-new

Description

After a user logoff, the "System" Process (PID 4) locks the following folders:

C:\Users\local_username\AppData\Local\Microsoft\Credentials
C:\Users\local_username\AppData\Roaming\Microsoft\Credentials

The user is completely logged of, according to Task Manager.

In the FSLogix Profile Log file I can see the following:

[07:53:55.601][tid:00000c90.0000ce44][ERROR:00000020] Delete profile failed for sid S-1-5-21-3364776539-3721753400-1968955100-1179, Cleaning up manually. (Der Prozess kann nicht auf die Datei zugreifen, da sie von einem anderen Prozess verwendet wird.)
The last sentence means that the process cannot access the file, because another process already uses it.

Also the whole "local_username" folder cannot be deleted:

[08:23:15.479][tid:00000c90.0000bcc4][WARN: 00000005] Failed to delete C:\Users\local_usename (Access is denied)
Access Denied

Does someone have any info on this behaviour?

Remote Desktop
Remote Desktop
A Microsoft app that connects remotely to computers and to virtual apps and desktops.
4,250 questions
FSLogix
FSLogix
A set of solutions that enhance, enable, and simplify non-persistent Windows computing environments and may also be used to create more portable computing sessions when using physical devices.
463 questions
{count} votes

105 answers

Sort by: Most helpful
  1. js2010 186 Reputation points
    2022-12-19T01:32:43.967+00:00

    Making a sanity check in powershell. Seeing if refcount is non-zero but the user is logged out. I take out the "DOMAIN\" part of the user. I wish the logon denials were logged when auditing is turned on.

    # profilecheck.ps1  
    function sid2user {  
      param($id)  
      $SID = New-Object System.Security.Principal.SecurityIdentifier($id)  
      $objUser = $SID.Translate([System.Security.Principal.NTAccount])  
      $objUser.Value -replace 'DOMAIN\\'  
    }  
    $qusers = quser  
    get-itemproperty HKLM:\SOFTWARE\Microsoft\Windows` NT\CurrentVersion\ProfileService\References\* refcount |  
    select @{n='Sid';e={$_.pschildname}},  
      @{n='User';e={sid2user $_.pschildname}},  
      @{n='Refcount';e={$_.refcount[0]}},  
      @{n='LoggedOut';e={-not [bool]($qusers|select-string (sid2user $_.pschildname))}}  
    # end profilecheck.ps1  
    
    
    $avd = 0..4 | % tostring avd-0  
    icm $avd profilecheck.ps1 | ? refcount | ? loggedout | ft  
    
    Sid                                              User       Refcount LoggedOut PSComputerName RunspaceId  
    ---                                              ----       -------- --------- -------------- ----------  
    S-2-6-31-1423303271-3025932689-4187700767-524288 abc123            3      True AVD-3          84594543-d151-53ee-ca1e-ec8a5186ca22  
    

  2. Андрей Михалевский 2,641 Reputation points
    2023-04-05T12:27:35.0933333+00:00

    This is an old problem, has been around for at least two years. The developers say it is not a problem with FSLogix, but with third-party applications. Unfortunately, even with Microsoft Office this is a common problem.


  3. Jos 106 Reputation points
    2023-08-10T15:01:01.6666667+00:00

    We do have the same issue, the local_username folder remains when the users has logged off on the server. Inside this are two folders which we cannot open because we then get Access denied:

    • \AppData\Local\Microsoft\Credentials
    • \AppData\Local\Microsoft\Office\16.0\OfficeFileCache

    We are using the following configuration:

    • Windows Server 2019 Standard 1809 17763.4645
    • FsLogix 2.9.8440.42104

    This is the error from Profile....txt

    [15:03:02.304][tid:00001054.00003978][ERROR:00000091]     Error removing directory: C:\Users\local_username\AppData\Local\Microsoft\Office\16.0 (De map is niet leeg.)
    [15:03:02.304][tid:00001054.00003978][WARN: 00000091]     Failed to delete C:\Users\local_username (De map is niet leeg.)
    
    
    

    A bit further in the log we see

    [16:24:04.929][tid:00001054.0000ad60][WARN: 00000005]    Failed to delete C:\Users\local_username (Toegang geweigerd.)
    
    

    Anyone who found a solution?


  4. Deleted

    This answer has been deleted due to a violation of our Code of Conduct. The answer was manually reported or identified through automated detection before action was taken. Please refer to our Code of Conduct for more information.


    Comments have been turned off. Learn more

  5. Deleted

    This answer has been deleted due to a violation of our Code of Conduct. The answer was manually reported or identified through automated detection before action was taken. Please refer to our Code of Conduct for more information.


    Comments have been turned off. Learn more