FSLogix Profile Containers. Failed to delete C:\Users\local_username (The directory is not empty.) (Access is denied.)

Graeme Bennett 1 Reputation point
2021-06-15T14:24:31.913+00:00

I am having an issue where some of the FSLogix temporary folders do not get deleted when the user logs off. The next time they log in, they will get a folder C:\Users\local_username1 (where the '1' is appended to the end).
This causes issues with some programs; they will error trying to access the users %TEMP% or %TMP%.
The error in C:\ProgramData\FSLogix\Logs\Profile states that:
Failed to delete C:\Users\local_username (The directory is not empty.)
Failed to delete C:\Users\local_username (Access is denied.)

Here is some background information:

  • Windows Server 2019 Standard [10.0.17763 N/A Build 17763]
  • Microsoft FSlogix Apps [2.9.7654.46150]
  • Six (6) Servers in the collection. Aproximately 80 users per server.
  • VHD located on a Samba share; RAID 10; good performance
  • Policies
    Administrative Templates
    FSLogix
    Days to keep log files Enabled 1
    Enable logging Enabled All logs enabled
    FSLogix/Profile Containers
    Delete local profile when FSLogix Profile should apply Enabled
    Enabled Enabled
    VHD location Enabled \SOMESERVER\Profiles
    FSLogix/Profile Containers/Advanced
    Keep local folder after user logs out Disabled
    Redirect temporary file folders to local computer Enabled Redirect TEMP, TMP and INetCache to local drive

Any suggestions would be appreciated.

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.
472 questions
0 comments No comments
{count} votes

13 answers

Sort by: Most helpful
  1. Leila Kong 3,696 Reputation points
    2021-07-30T03:03:59.043+00:00

    Hello @Graeme Bennett ,

    Thanks for your feedback.

    Did you try to change the GPP to update instead of replace?
    https://www.meinekleinefarm.net/caution-fslogix-2009-2-9-7621-30127-profiles-wont-logoff-completely/

    It seems a known issue with fslogix that you can check the following post for reference:
    https://video2.skills-academy.com/en-us/answers/questions/229309/fslogix-unclean-logoff-causing-locked-files-until.html?page=5&pageSize=10&sort=oldest

    The workaround may be reboot the server.

    I've synced with our internal team that customer can submit fslogix feature suggestions here and let others upvote for it to see if there will be any feedback from the product team: https://techcommunity.microsoft.com/t5/azure-virtual-desktop/idb-p/AzureVirtualDesktop


  2. Андрей Михалевский 2,746 Reputation points
    2023-10-17T07:06:18.2933333+00:00

    Please put a like under my last post. Maybe together you can get them to fix this problem.

    https://techcommunity.microsoft.com/t5/fslogix-blog/announcing-general-availability-of-fslogix-2210-hotfix-2/ba-p/3906433

    0 comments No comments

  3. Sanjay 10 Reputation points
    2024-05-08T06:56:05.6433333+00:00

    I am also having same issue and only option to solve it reboot server.

    FsLogix version: 2.9.7654.46150

    OS version: Windows server 2019

    0 comments No comments