0

I have installed Yaws webserver on my Windows Vista machine. Now I want to edit yaws.conf so that the server listen to another port instead of the default 8080.

But when I'm editing the file in a text editor, I can not save the file, because it says that another application is using the file. But I haven't started Yaws yet and I am logged in as an administrator.

I am using the latest version of Yaws, 1.88.

Any suggestions on how I can edit and save yaws.conf?

With Notepad++ I get this message, when trying to save:

Please check whether if this is opened in another program

And if I edit the file in Notepad I get this message (translated from swedish):

The file [path] could not be created. Check that the file path and name is correct.

Jonas
  • 1,147
  • 5
  • 17
  • 31
  • You should get a different error message, but just to be sure, are you sure the file isn't read-only? – Cocowalla Jul 21 '10 at 21:27
  • @Cocowalla: It looks like it's not read-only or write-protected if I look at the file properties. – Jonas Jul 21 '10 at 21:30
  • Are there any Swedish characters in the path? – Cocowalla Jul 21 '10 at 21:45
  • @Cocowalla: No the path is `C:\Program Files (x86)\Yaws-1.88\yaws.conf` – Jonas Jul 21 '10 at 21:50
  • And there is no other process that has a lock on the file: http://superuser.com/questions/166265/how-can-i-see-what-process-has-a-lock-on-a-textfile – Jonas Jul 21 '10 at 21:51
  • That was going to be my next question :) What about file permissions - does your account have write access? (although again I would expect a different error message if that was the issue) – Cocowalla Jul 21 '10 at 22:05
  • @Cocowalla: Yes, I am logged in as Administrator and I have all file permissions, including write permissions. – Jonas Jul 21 '10 at 22:12
  • Last questions, then I'm out of idead :) Is the path very long (may be an issue if it's too long)? Have you tried disabling any antivirus or HIDS software before attempting to save? – Cocowalla Jul 22 '10 at 06:47

1 Answers1

2

After asking you lots of questions, I only just realised that you are using Vista - so I think I may finally have a solution.

If you want to save anything to C:\Program Files or C:\Program Files (x86) in Vista or 7, you must run the application with escalated privileges.

Notepad++ should really be showing you a UAC prompt when you try to save to this area, ut does not yet: http://sourceforge.net/tracker/index.php?func=detail&aid=2936528&group_id=95717&atid=612382

I believe that if you start Notepad++ (or notepad, or whatever in escalated mode first, and then open and save the file it should work. If you're unsure how to do this, see here (it's note specific to Notepad++, but you want to use the same steps).

Cocowalla
  • 623
  • 5
  • 16