Hi.
Installed Privoxy 3.0.32 on Win 10, but when closing it not restart was possible.
Error message:
Privoxy Error: Fatal Error: init_error_log(): can't open logfile: '\privoxy.log'
Starting it with admin rights no errors happen.
I read no advices to use admin mode for Privoxy here with Windows 10:
http://www.privoxy.org/user-manual/startup.html
http://www.privoxy.org/user-manual/quickstart.html
thx
On 6/12/21, Clemens Ratte-Polle wrote:
You shouldn't be using admin mode for normal use, so you've got that
part right :)
Privoxy logging isn't enabled by default, so there isn't a good write
up for enabling it on windows... the assumption is that if you do
enable logging, you know how to put the log file where everyone can
write to it.
https://www.privoxy.org/faq/trouble.html#FILE-PERMISSIONS
shows how to fix file permissions.
I like having the log file outside of the program files directory, so
my privoxy config.txt has
logdir C:\temp
logfile privoxy.log
and the permissions on \temp\privoxy.log are
C:>cacls \temp\privoxy.log
C:\temp\privoxy.log I3668\Lee:(ID)F
BUILTIN\Administrators:(ID)F
NT AUTHORITY\SYSTEM:(ID)F
BUILTIN\Users:(ID)R
NT AUTHORITY\Authenticated Users:(ID)C
so anyone is allowed to write & just me (or me logged in as the admin)
is allowed to delete.
Suggestions for how to improve the documentation would be welcome.
Regards
Lee
Related
Bugs: #927
The problem are file permissions to the log file. Privoxy is installed by the Windows installer by default in the "C:\Programs (x86)\Privoxy\" folder, and files in that directory can only be changed by admins. By default, the log file location is privoxy.log in the same install directory. So, only applications running as admins can write to the log file. This is what is causing the bug.
That statement is not correct. If I install Privoxy on Windows with the installer, logging is enabled by default, to the privoxy.log file in the installation directory, which can only be modified with admin rights, therefore producing the error at startup. Furthermore, the error is fatal, preventing Privoxy from running.
The default install on Windows with the installer shows this bug here.
It works immediately after install, because the installer runs with admin rights, and launches privoxy.exe, which then inherits the admin rights. So, the first start right after installation works. But it works only exactly once.
No other start after that works. I tried:
* Starting privoxy.exe manually by double-clicking on it in Windows Explorer
* Starting "Privoxy" from the Start menu (the entry added by the installer)
* Rebooting and autostart of Privoxy (the autostart added by the installer)
All of them show the same fatal error message:
Privoxy Error: Fatal Error: init_error_log(): can't open logfile: '\privoxy.log'
The default install is broken.
Last edit: Ben Bucksch 2022-02-04
Workaround, until the default config is fixed:
#
at the start of the line:#logfile privoxy.log
Last edit: Ben Bucksch 2022-02-04
On 2/3/22, Ben Bucksch benb@users.sourceforge.net wrote:
The workaround from the FAQ still works for me:
Start / Windows System / right click on 'Command Prompt'
left click on More / Run as administrator
In the new command prompt window:
cd "\Program Files (x86)"
cd Privoxy
C:\Program Files (x86)\Privoxy>cacls config.txt /g users:f
Are you sure (Y/N)?y
processed file: C:\Program Files (x86)\Privoxy\config.txt
C:\Program Files (x86)\Privoxy>notepad config.txt
-- change the "logdir ." line to "logdir C:\temp"
-- note that I already have a c:\temp directory, you might have to
-- mkdir c:\temp
C:\Program Files (x86)\Privoxy>grep logdir config.txt
2.4. logdir
-LR- logdir .
logdir C:\temp
File name, relative to logdir
C:\Program Files (x86)\Privoxy>
Regards,
Lee