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

13 answers

Sort by: Most helpful
  1. Thomas Brandlehner 1 Reputation point
    2021-06-15T20:29:40.407+00:00
    0 comments No comments

  2. Leila Kong 3,701 Reputation points
    2021-06-18T07:34:01.173+00:00

    Hello @Graeme Bennett ,

    Thanks for your query.

    1.Will the issue be fixed if you downgrade to FSLogix 2004 (2.9.7349.30108)?
    2.Please check your GPO settings that defines the local FSLogix include\exclude groups.
    FSLogix now uses the SID of the local include\exclude groups. So if the GPO is set up to "replace" instead of "update", it will stop working after a gpupdate within users session. This because the local groups get recreated and get new SIDs.
    https://www.meinekleinefarm.net/caution-fslogix-2009-2-9-7621-30127-profiles-wont-logoff-completely/
    3.Please also check the following post similar with your problem:
    https://learn.microsoft.com/en-us/answers/questions/229309/fslogix-unclean-logoff-causing-locked-files-until.html?page=1&pageSize=10&sort=oldest
    4.The next version of FSLogix is scheduled to be released due June 2021. You may check then if the issue can be fixed with the new version, thank you.

    Best regards,
    Leila


    If the Answer is helpful, please click "Accept Answer" and upvote it.
    Note: Please follow the steps in our documentation to enable e-mail notifications if you want to receive the related email notification for this thread.

    0 comments No comments

  3. Leila Kong 3,701 Reputation points
    2021-06-22T10:25:46.7+00:00

    Hello @Graeme Bennett ,

    Just checking in to see if the information provided was helpful.
    Please let us know if you would like further assistance.

    0 comments No comments

  4. Leila Kong 3,701 Reputation points
    2021-07-06T10:00:45.57+00:00

    Hello @Graeme Bennett ,

    We haven’t heard from you in a couple of days.
    How are things going there on this issue?

    0 comments No comments

  5. Kuhn Marc 1 Reputation point
    2021-07-16T09:11:52.987+00:00

    Hi all

    we also are struggeling with the FSLogix local Profiles. We initially had the following setup:

    • Server 2019
    • Citrix CVAD 1912 CU1
    • FSLogix 2.9.7654.46150
    • Permissions on Folder with VHDX User Profile Disk (This folder only / Full Control)

    We discovered that everything is running well, but the local Profiles are still present after a user logoff. In the log we see that error:

    Failed to delete C:\Users\local_username (Access is denied.)

    Then we tried today to install the latest version (2.9.7838.44263) on a Test VDA. Now we receive that error here:

    Failed to delete C:\Users\local_username (The directory is not empty.)

    Does anybody having the same issues or is this solved? By the way, we also have this regkey in place:

    HKEY_LOCAL_MACHINE\SOFTWARE\FSLogix\Apps\CleanupInvalidSessions (REG_DWORD, 0x1)

    What we saw, that if i just login and logout it is working just fine. If i start to use tools like Adobe Acrobat or Outlook the local Profile get's stuck after logout.

    Is there any solution for that?

    Many thanks for your help.

    Best regards,
    Marc

    0 comments No comments

Your answer

Answers can be marked as Accepted Answers by the question author, which helps users to know the answer solved the author's problem.