locked
Windows 2008 Server - Can't save files, but can overwrite RRS feed

  • Question

  • 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
    Tuesday, June 30, 2009 1:00 PM

Answers

  •  

    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.
    • Proposed as answer by David Shen Thursday, July 2, 2009 2:21 PM
    • Marked as answer by David Shen Wednesday, July 8, 2009 6:12 AM
    Thursday, July 2, 2009 6:13 AM
  • 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.
    • Marked as answer by apaulsen Wednesday, July 15, 2009 3:39 PM
    • Edited by apaulsen Wednesday, July 15, 2009 4:49 PM typo
    Wednesday, July 15, 2009 3:39 PM

All replies

  • 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.
    Tuesday, June 30, 2009 1:28 PM
  • 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.
    Wednesday, July 1, 2009 3:01 AM
  • 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.
    Wednesday, July 1, 2009 6:49 AM
  • 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.
    Wednesday, July 1, 2009 6:51 AM
  •  

    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.
    • Proposed as answer by David Shen Thursday, July 2, 2009 2:21 PM
    • Marked as answer by David Shen Wednesday, July 8, 2009 6:12 AM
    Thursday, July 2, 2009 6:13 AM
  •  

    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.

    When running handle.exe, and with the application NOT running, i find the file listed like so:
    System pid: 4 \<unable to open process>
     228C: File  (RW-)   C:\pathtoconfigfile.xml

    What does this mean?
    Friday, July 3, 2009 8:34 AM
  •  

    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.

    When running handle.exe, and with the application NOT running, i find the file listed like so:
    System pid: 4 \<unable to open process>
     228C: File  (RW-)   C:\pathtoconfigfile.xml

    What does this mean?
    Hi Anders,

    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.
    Friday, July 3, 2009 10:23 AM
  •  

    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.

    When running handle.exe, and with the application NOT running, i find the file listed like so:
    System pid: 4 \<unable to open process>
     228C: File  (RW-)   C:\pathtoconfigfile.xml

    What does this mean?
    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.

    Thanks.

    This posting is provided "AS IS" with no warranties, and confers no rights.
    • Marked as answer by David Shen Wednesday, July 8, 2009 6:12 AM
    • Unmarked as answer by apaulsen Wednesday, July 15, 2009 3:39 PM
    Monday, July 6, 2009 5:37 AM
  • 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.
    • Marked as answer by apaulsen Wednesday, July 15, 2009 3:39 PM
    • Edited by apaulsen Wednesday, July 15, 2009 4:49 PM typo
    Wednesday, July 15, 2009 3:39 PM
  • Did you ever find out what the problem was?  I too am having the same issue and the file is not in use nor do I have the option of opening it as administrator - which should be necessary since I am the admin on the server.

     

    Friday, May 21, 2010 5:44 PM