Windows 2008 Server - Can't save files, but can overwrite
- Hi, on our server running windows 2008 server sp2, we are having problems editing some configuration files for our applications. The files (plain-text) can be opened and read, but if we try to edit them, and then save them, Notepad replies "Cannot create <filename> file." Wordpad replies something similar. The only way we've found to edit these files so far is by saving the changed file to another directory, and then copy/pasting the new file, overwriting the old file.
The files do not appear to be marked as read-only, and they are owned by the Administrator group which my user is in, which again has 'Full access' to all these files.
How can we find out what is stopping us from editing these files?
Anders
Odpovědi
Hello Anders,
Please check whether the application or the corresponding service is running when you tried to edit the configuration file of that application. If that is the case, it is most probably that we cannot save the configuration file after we modify it. It is because that the file was owned and handled by that application at that time.
For investigating what application open the file handle of the configuration file, we may use Handle utility to dump the file handle.
Download: Handle
http://download.sysinternals.com/Files/Handle.zip
Gather the information at the problematic client:
handle –a > clienthandle.txt
handle –a > serverhandle.txt
Hope it helps.
This posting is provided "AS IS" with no warranties, and confers no rights.- Navržen jako odpověďDavid Shen - MSFTMSFT, Moderátor2. července 2009 14:21
- Označen jako odpověďDavid Shen - MSFTMSFT, Moderátor8. července 2009 6:12
Hi Anders,
I perform a research on the handle.txt that you send.
228C: File (RW-) C:\pathtoconfigfile.xml
This means that the configuration file is open with Read and Write by a system application file. Please kindly check to verify that application is not running when you tried to modify the configuration file at that time.
Like i mentioned in the email to you, there are other files that i cannot edit, that are not listed in this file. I've also tried stoppig the application and editing the file listed, and it does not help. Neither does rebooting and trying again. We've had to downgrade from Windows 2008 for now, since we think the system is unusable this way. Since the installation no longer exists, there is no way of testing anymore.
Všechny reakce
- Maybe it helps, if you start the Wordpad as administrator (rightclick...). And then open the file.
It seems that wordpad has no rights. But the user has. - I have seen this, but only with files that are in use. In this case, Wordpad will not open them but Notepad will.
Strangely enough, after the "Cannot create..." message, when the "save as" dialog opens I can save using the same name and Windows will actually save the edited file even though it is in use. - Running wordpad as administrator allows me to save the file, but it doesn't make much sense to me as the Administrator user is a member of the same (and only) group my user is a member of, namely the group Administrators. The other users that are experiencing the same problem are also in this group.
Strangely enough, after the "Cannot create..." message, when the "save as" dialog opens I can save using the same name and Windows will actually save the edited file even though it is in use.
Unfortunately, this doesn't work for me. It still gives me the same errors as before.Hello Anders,
Please check whether the application or the corresponding service is running when you tried to edit the configuration file of that application. If that is the case, it is most probably that we cannot save the configuration file after we modify it. It is because that the file was owned and handled by that application at that time.
For investigating what application open the file handle of the configuration file, we may use Handle utility to dump the file handle.
Download: Handle
http://download.sysinternals.com/Files/Handle.zip
Gather the information at the problematic client:
handle –a > clienthandle.txt
handle –a > serverhandle.txt
Hope it helps.
This posting is provided "AS IS" with no warranties, and confers no rights.- Navržen jako odpověďDavid Shen - MSFTMSFT, Moderátor2. července 2009 14:21
- Označen jako odpověďDavid Shen - MSFTMSFT, Moderátor8. července 2009 6:12
When running handle.exe, and with the application NOT running, i find the file listed like so:Hello Anders,
Please check whether the application or the corresponding service is running when you tried to edit the configuration file of that application. If that is the case, it is most probably that we cannot save the configuration file after we modify it. It is because that the file was owned and handled by that application at that time.
System pid: 4 \<unable to open process>
228C: File (RW-) C:\pathtoconfigfile.xml
What does this mean?
Hi Anders,
When running handle.exe, and with the application NOT running, i find the file listed like so:Hello Anders,
Please check whether the application or the corresponding service is running when you tried to edit the configuration file of that application. If that is the case, it is most probably that we cannot save the configuration file after we modify it. It is because that the file was owned and handled by that application at that time.
System pid: 4 \<unable to open process>
228C: File (RW-) C:\pathtoconfigfile.xml
What does this mean?
To help you analyze the issue, could you please send the result of handle.exe to us via tfwst@microsoft.com
Thanks.
This posting is provided "AS IS" with no warranties, and confers no rights.
Hi Anders,
When running handle.exe, and with the application NOT running, i find the file listed like so:Hello Anders,
Please check whether the application or the corresponding service is running when you tried to edit the configuration file of that application. If that is the case, it is most probably that we cannot save the configuration file after we modify it. It is because that the file was owned and handled by that application at that time.
System pid: 4 \<unable to open process>
228C: File (RW-) C:\pathtoconfigfile.xml
What does this mean?
I perform a research on the handle.txt that you send.
228C: File (RW-) C:\pathtoconfigfile.xml
This means that the configuration file is open with Read and Write by a system application file. Please kindly check to verify that application is not running when you tried to modify the configuration file at that time.
Thanks.
This posting is provided "AS IS" with no warranties, and confers no rights.- Zrušeno označení jako odpověďapaulsen 15. července 2009 15:39
- Označen jako odpověďDavid Shen - MSFTMSFT, Moderátor8. července 2009 6:12
Hi Anders,
I perform a research on the handle.txt that you send.
228C: File (RW-) C:\pathtoconfigfile.xml
This means that the configuration file is open with Read and Write by a system application file. Please kindly check to verify that application is not running when you tried to modify the configuration file at that time.
Like i mentioned in the email to you, there are other files that i cannot edit, that are not listed in this file. I've also tried stoppig the application and editing the file listed, and it does not help. Neither does rebooting and trying again. We've had to downgrade from Windows 2008 for now, since we think the system is unusable this way. Since the installation no longer exists, there is no way of testing anymore.

