Files disappearing, or being wiped in the past few weeks
Hello, anyone notice any odd file behavior in the past few weeks?

A few weeks ago my user.cfg got it's contents completelt wiped out. I restored from a backup then set it to read only. Than shortly after my rust.bat launch script, and my rustdedicated.exe were just gone. I did update validate to restore the .exe, and restored the batch file from a backup.

That was a couple of weeks ago, and today it happened again. This time I saw an error when i shut down as here:

UnauthorizedAccessException: Access to the path "C:\SteamCMD\rust_server\server\
my_server_identity\cfg\users.cfg" is denied.
UnauthorizedAccessException: Access to the path "C:\SteamCMD\rust_server\server\
my_server_identity\cfg\users.cfg" is denied.
at System.IO.FileStream..ctor (System.String path, System.IO.FileMode mode, Sy
stem.IO.FileAccess access, System.IO.FileShare share, System.Int32 bufferSize, S
ystem.Boolean anonymous, System.IO.FileOptions options) [0x0019e] in <ac823e2bb4
2b41bda67924a45a0173c3>:0
at System.IO.FileStream..ctor (System.String path, System.IO.FileMode mode, Sy
stem.IO.FileAccess access, System.IO.FileShare share, System.Int32 bufferSize, S
ystem.IO.FileOptions options, System.String msgPath, System.Boolean bFromProxy,
System.Boolean useLongPath, System.Boolean checkHost) [0x00000] in <ac823e2bb42b
41bda67924a45a0173c3>:0
at (wrapper remoting-invoke-with-check) System.IO.FileStream..ctor(string,Syst
em.IO.FileMode,System.IO.FileAccess,System.IO.FileShare,int,System.IO.FileOption
s,string,bool,bool,bool)
at System.IO.StreamWriter.CreateFile (System.String path, System.Boolean appen

Whet ever is going on went after my user.cfg again and got access denied because I set it to read only the first time it happened.
However the server wouldn't start because it deleted my rustdedicated.exe, and I couldn't launch fresh because it deleted my rust.bat file again.

I been doing scans using AVG, and Norton powereraser. Powereraser is not the weak regular norton. It's a standalone npe.exe, thats known for being overpowered.
The system is completely clean, SSD it Samsung in good health @only 4tb, and the funky file behavior only happens under the rust server directory.

It only seems to target rustdedicated.exe, the batch file to launch the server, and the user.cfg files.

Just a heads up, and if anyone else is having these issues.
It's not a thing until multiple people have the same issue, so?

EDIT: That error was copies straight off console. I cant find one word of it in any of the logs, nor anywhere on the drive. As if it's all that virtual file thing going on in the unity virtual space? Funny crap ever since the last big unity update that brought the oxide custom console as well. Unity spams about directories an files I don't have, and freaking deletes files I do have, lol.
That error means that Rust can't access the file as you set it to read-only.
In response to Wulf ():
That error means that Rust can't access the file as you set it to read-only.
I havent changed any admins or users. Rust only would need to write it if I issued an admin change in console. It was emptied for no reason, and I add and remove admins by editing that file for the last 3 years. 
I just rebooted the server, and the next time I logged I was not owner, and my moderator was not moderator. The file was blank.

Then today I see thatin the console screen. Rust has no need to try to write that file unless I add or remove an admin in console. They can read it and they do, because it I'm auth level 2.
In response to Snivel ():
I havent changed any admins or users. Rust only would need to write it if I issued an admin change i...
What's the problem of giving Rust the full access to all the files owned by it? (All the downloaded or automatically created files). It's not a good practice to restrict access to the app's files. You won't run into any security issues either - all the uMod plugins are sandboxed and only have access to /oxide/... dirs.
In response to 2CHEVSKII ():
What's the problem of giving Rust the full access to all the files owned by it? (All the downloaded...
I believe the OP mentioned that was set because the wipe was wiped without a reason why.
In response to 2CHEVSKII ():
What's the problem of giving Rust the full access to all the files owned by it? (All the downloaded...
LOL! The particular file is for ME to tell RUST who is who and NOTHING MORE. They have full access for that PURPOSE.

Also the ACCESS DENIED error in this case can only mean a script tried to wipe it out again.

If you read my comment, you can see that I didnt restrict access to rustdedicated.exe which steamcmd needs to access every time there is an update.
That file got deleted as well.

In summary:
RustDedicated.exe (their file that I paid for), and rust.bat (my file), got deleted twice on server boot in incidents 2 weeks appart.
User.cfg (my file) got contents wiped ONCE in the first incident, and in the second incident
the write attempt got access denied because I protected it.
Rust only needs to read that file, and would only need to write it if I used console, or a chat command with a plugin to change owners or moderators. I don't use console or plugins to manage my admins.

There could be one senario where Rust would need write access, but it is unlikely.
That would be on an engine update, where Rust wants to change the data format of MY admin data. In that case rust would read the data, change the format, then rewrite the file.

Kind of like what would happen if a program like MySQL wanted to convert a config file to be read from php8 instead of the current php 5.6.

It's possible, since it has been happening durring shutdown, that it becomes an empty file, and before the rewrite can occur, shutdown completes, then I had to interrupt my watchdog script as I do when I don't want to actually reboot just yet to reboot the machine or edit the launch parameters or whatever. It may have tried to rewrite the files on reboot.

So far it's just:
RustDedicated.exe (gets deleted) For sure they don't want it deleted.

rust.bat (gets deleted) This file is also named and created by me so it negates my attempt to see how these incidents are rust doing a legit thing.

AND
user.cfg (gets contents wiped aand not replaced with anything)

Purpose for the topic/thread is to see if anyone is having this issue or if its a known issue, at this time.
I don't think there's any script or anything causing your issue, Rust does save entries from memory to the users.cfg file each time the server saves.
In response to Wulf ():
I don't think there's any script or anything causing your issue, Rust does save entries from memory...
Funny that the second time this happened is I rebooted a few minutes after I updated the infopanel.cs with the code in the thread, that fixes the one error that plugin generates on boot.
I went back to the last official just in case.

But if rust saves on shutdown, and the shutdown process crashed, could explain the empty contents for user.cfg.

That doesn't explain why rustdedicated.exe and rust.bat both got deleted twice though.
My Samsung SSD is in good health 4tb written  50% space used + its a 250 gig partition on a 500gb SSD, and it's only those files twice.
If it were SSD health/life, I'd b losing random files all over the place.

EDIT:
Maybe I should try to duplicate the issue by paste updating infopanel.cs.
Last official is 0.9.9, and the pastbin fix calls it 1.0.0
In response to Snivel ():
Funny that the second time this happened is I rebooted a few minutes after I updated the infopanel.c...
Yeah, files being randomly deleted would have to either be data loss else something outside of the server removing them.
In response to Wulf ():
Yeah, files being randomly deleted would have to either be data loss else something outside of the s...
Ok so I created a config backup directory, write protected that, and set user.cfg to r/w.
Also I will try the infopanel.cs pastbin fix again.
I dont get how he was able to change the version # in the cs though. Last time I tried to change the version # of a plugin recently it got an error.

I may go ahead and search contents of all files in the directory structure for any code            that points to the three files in question, but I am really more weary of the unity engines implimention of this sort of "virtual data workspace" thing they been doing lately.
They may have gotten ahead of themselves.
They wouldn't be the only ones that release prior to proper debug of old days. Even Microsoft build 1809 was a big fail. It only works on all my old computers, but stuck at 1803 on the two up to date modern computers with 1080Ti's, and i7 and above.
Welcome to live staging in 2019, lol.
In response to Snivel ():
Ok so I created a config backup directory, write protected that, and set user.cfg to r/w.
Also...
Plugin version set in InfoAttribute as the third argument, it's either string or double. When changing ANY code of the plugin, i suggest using IDE with code analisys function, so you will know exactly, if you made something wrong (dont forget to reference dependencies).
Also, never had any problem with disappearing files even tho whole rust dir is unrestricted.
Microsoft fails to fix all the bugs cuz Windows is freaking huge. Even their dev team cant predict all the stuff that can happen. 
All the rust problems happening last two months is all around the thing FP suck really big ass. 
yea, the unity updates are brutal. They literally introduce new concepts, implement them into game, then do new totally unrelated new things w/o fixing the bugs in the current state.

Like batteries are still useless because they drain connected to anything but a switch.
I literally have battery banks, and it all hooked up, waiting for the day they ever fix the issue.
It's known issue, but I wonder if they know it.

About the new infopanel code, NICE! It worked for getting rid of the error on boot, everything is fine in game, and nothing happened bad when I reboot the server.
Running it for a few hours now.

I un write protected my user.cfg, and lost the error on shut down, but they don't really need write every boot. I haven't changed the contents for months. Facepunch really could fix their performance issues by simply NOT doing needles things.
And the watchdog script i set up is good, but I think I will add a 10-20 second pause between when it finishes shutting down, and when it starts to boot. this way I can "break" out cleen when I shutdown the server and dont want to boot it back up instantly.

I could have lost the files hitting the little X in the top right of the window, because I missed the clean spot to break.

And now we have the console launching another window temporarily every boot. I've hit the X on both of them when the server restarted when I actually wanted to reboot the machine, lol.

so could lose files there I suppose. I don't know actually how critical that act is.
I do know that if iI did it durring an update of rustdedicated and killed the process right when it finished downloading the file, after it deleted the original, but before it moved the new one from steamcmd\download to \rust_server I could lose the file.

Seems good for now. 

i suppose most people arent hosting on a server in their house and are hosted off site, so If it is my rough handling of the windows, we may not hear many people having any problems.
UPDATE!
This is just for general info, and for Wulf to ponder, I suppose.

This thing where Rustdedicated.exe and my launch script rust.bat gets deleted, I had happen today like 6 times when I tried to move the server to a different machine temopororarily. 
It happens when the console screens crash while server is starting because of an error, or the screens are abruptly shut down (hard break).
I can reproduce it by simply putting a bunk IP address causing the startup to fail. It then goes and deletes the files.
In todays case I changed to a different IP, but the IP I chose was a conflict for another machine. I got the "not a local IP error" and it deleted the files.

Rust is getting complicated these days. We used to easily move the servers from machine to machine, but now you have to be careful everything is correct, and don't interrupt the boot process.
The server not starting from an invalid command line wouldn’t cause it delete files, nor would a general crash. There has to be something either with the setup or a hardware issue for data loss/deletion to be happening.
In response to Wulf ():
The server not starting from an invalid command line wouldn’t cause it delete files, nor would a gen...
It happened on 2 different windows 7 x64 ( a core2 quad and core 2 duo)machines today, but it didn't do it on my i7 windows 10 x64 machine.

It is the same setup that has been running since late 2015. Maybe I need to clean house?
Should I just pull out my oxide directory wipe it out and let steamcmd replace everything, then put oxide back?