'.NET Core apps on Linux (Redhat) creating mysterious ".net" directories/files in user home directories
We have a series of .NET Core console apps that are installed in a particular directory:
/users/apps/app1/MyApp1
/users/apps/app2/MyApp2
etc...
The apps run fine. However, we have a problem where the .NET runtime seems to place some files in a ".net" folder in the current user's home directory.
unclejoe@myhost::/home/unclejoe> ls -la
total 40
drwx------. 8 unclejoe mygroup 139 Jan 24 14:42 .
drwxr-xr-x. 90 root root 4096 Jan 21 15:29 ..
-rw-------. 1 unclejoe mygroup 15510 Jan 24 14:42 .bash_history
drwx------. 10 unclejoe mygroup 190 Jan 24 01:42 .net
Within the .net folder, we see a bunch of seemingly temp folders:
[unclejoe@myhost .net]$ ls -la
total 4
drwx------. 10 unclejoe mygroup 190 Jan 24 01:42 .
drwx------. 14 unclejoe mygroup 4096 Jan 23 16:28 ..
drwx------. 4 unclejoe mygroup 46 Jan 24 12:09 MyApp1
drwx------. 5 unclejoe mygroup 66 Jan 24 01:42 MyApp2
Drilling further:
[unclejoe@myhost MyApp1]$ ls -la
total 24
drwx------. 4 unclejoe mygroup 46 Jan 24 12:09 .
drwx------. 10 unclejoe mygroup 190 Jan 24 01:42 ..
drwx------. 2 unclejoe mygroup 8192 Jan 24 01:42 cz1zui3n.uma
drwx------. 2 unclejoe mygroup 8192 Jan 24 12:09 pvwttlkm.z4s
Drilling furthest:
[unclejoe@myhost MyApp1]$ cd cz1zui3n.uma
[unclejoe@myhost cz1zui3n.uma]$ ls -l
total 30808
-rw-r--r--. 1 unclejoe mygroup 330240 Jan 24 01:42 Autofac.dll
-rw-r--r--. 1 unclejoe mygroup 16384 Jan 24 01:42 Autofac.Extensions.DependencyInjection.dll
-rw-r--r--. 1 unclejoe mygroup 143609 Jan 24 01:42 MyApp1.deps.json
-rw-r--r--. 1 unclejoe mygroup 10752 Jan 24 01:42 MyApp1.dll
-rw-r--r--. 1 unclejoe mygroup 149 Jan 24 01:42 MyApp1.runtimeconfig.json
-rw-r--r--. 1 unclejoe mygroup 27136 Jan 24 01:42 Common.dll
The problem is we don't expect these artifacts (dlls/app binaries) to be pushed here as its eating up a lot of space over time, especially when these strange temp directories get created (and never cleaned up on its own). We do not specify any environment variable in our .NET code to point to this home location.
Question:
- Do you know what's causing these directories and files to get created? It appears to get created when the app runs after some period of time.
- Any areas that we should be checking to identify root cause?
Thanks!
Sources
This article follows the attribution requirements of Stack Overflow and is licensed under CC BY-SA 3.0.
Source: Stack Overflow
| Solution | Source |
|---|
