I have renamed a Windows Server using the Control Panel feature. This worked fine at first. Today I noticed that I was unable to rename a certain file that I always was able to rename before. This file was a SQL Server database file. The SQL Server service was successfully able to use the file. But even after shutting down the server I got the message:
You require permission from Administrator to make changes to this file
So the file clearly was not locked by a running program.
Reviewing the security settings in Windows Explorer I found out the following:
- There was a noticable delay when resolving the SID's to user names
- The SQL Server user still had the old server name in its name. However that seems to be harmless because the user name is an uninterpreted string (right?)
- I saw nothing suspicious (like unresolved SID's or the old server name as the domain part of some user name)
- Even giving Full Control to Everyone did not allow me to rename the file
- Changing ownership to Administrators (and I am a member of that group) restored access
I ran SysInternals AccessEnum to enumerate the drive that the file in question was on. The output showed a few "???" markers.
I do not fully understand why I lost access to that file. Some permissions must have been lost when renaming the server. What happened?
Also, do I need to fix the server somehow after renaming it? I worry that there are a lot of latent permission issues now that I will only discover over time.