-
Notifications
You must be signed in to change notification settings - Fork 759
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Regression: Mass PHP Errors (Permission denied) after opnsense Update #3241
Comments
|
@lattera could there be some kernel security setting which prevents the user squid from reading @uKev can you try the following: And check if the errors are returning instantly? |
|
Thanks for the quick reply. Just tried your commands out: No, the errors are not returning instantly. Besides this I did delete the file two weeks ago ago and rebootet the system. It needed some time until the file comes back. Besides the error message squid works fine as it should. In the System -> Log Files -> General I just noticed the following messages: Also the page "Services -> Web Proxy -> Log File -> Cache" needs a long time to load. |
|
so after a restart of squid, no new errors and authentication still works? |
|
Are hardlinks being used? Take a look at the hardlink hardening in HardenedBSD: https://github.com/HardenedBSD/hardenedBSD/wiki#modified-sysctl-nodes In particular, these sysctl nodes:
|
|
There shouldn't be any hard links involved, but I can see if there's a way to replicate the issue this week and set both to 0.... you never know. |
|
At the moment there are no new errors. But I think they will come back in a few days. I don't use authentication. I started with opnsense when proxy auth was not required. Later I remember that I had to configure "Allowed Subnets" and "Unrestricted IP addresses" in Access Control List to use it again. Looking at it now I see "Authentication method" has "nothing selected" as value: |
|
I remember these two from over the years... https://forum.opnsense.org/index.php?topic=2886.msg8875#msg8875 But it looks like a new problem. Make sure that all packages are correctly installed so that their permissions are correct as well (squid3 and opnsense, best to hit reinstall for those two). |
|
hmm, with basic auth disabled, it shouldn't even try to do this. can you check if the following returns anything? |
|
@lattera it doesn't seem to be related to the hard link settings, but seems fairly easy to reproduce. Using sysctl I've set both the hardlink settings to To reproduce the issue, go to the "web proxy" --> "forward proxy" --> "authentication settings" and choose "Local Database". Apply settings, stop the proxy and go to a console. Flush the cache log, start squid and tail the log. Now configure your browser to use the proxy, you will be asked for a username and a password, try something (doesn't matter what), and see the tail get flooded by: Installing an older squid version (from 18.7), doesn't seem to show much difference, I've tried to install the version from 18.7.1 ( I don't have a stock FreeBSD version around, so I'm not 100% sure this relates only to HardenedBSD. |
|
Great that you could reproduce it. Here is the output: As expected the error log appeared again. It started exactly at midnight (cronjob?): And just for completeness here is the update history: |
|
@uKev can you save the proxy settings, and grep again? Since your authentication isn't enabled, the issue shouldn't affect you, so it looks like something went wrong with your configuration, saving settings might help. (the auth_param tags shouldn't be there in your case) If the auth_params are gone, your issue should be fixed, but the real issue however remains. Hopefully @lattera has some ideas around the subject. |
|
Applying the settings was not enough. I had to press "Clear All" on "Authentication method" to remove the auth_param lines from squid.conf. Now I removed the error log again and restarted squid. It shouldn't reappear. If it does, I will leave a note. Thanks for your work to everyone. |
|
ok, thanks for reporting, we're keeping this open as bug for the authentication issue. |
|
found it, when introducing config locking, I forgot about read-only access 5123277 |
|
Hi everyone |
|
Hi @Wirewrap64, The patch will be part of the 19.1.2 stable release this week. It won't be updated on new installations for 19.1 unless we release new images based on 19.1.x which currently is not planned, so each new 19.1 installation must be updated to 19.1.2 in order to fix the bug or you need to issue the patch command (or copy the file as you did) on 19.1 and 19.1.1: Cheers, |
|
Hi @fichtner, thank for the answers !!! Ciao |
|
@Wirewrap64 of course, no problem :) |

Important notices
Before you add a new report, we ask you kindly to acknowledge the following:
[x] I have read the contributing guide lines at https://github.com/opnsense/core/blob/master/CONTRIBUTING.md
[x] I have searched the existing issues and I'm convinced that mine is new.
Describe the bug
Opnsense fills up the disk writing php error messages to /tmp/PHP_errors.log.
Lobby -> Dashboard takes a long time to load and has an error message "A problem was detected. Click here for more information."
Clicking on the link shows "Unfortunately we have detected at least one programming bug."
And a very long scrollbar shows the php error file.
To Reproduce
I updated from version 18.7.9 to 19.1. The error started after this update, so my guess is the migration scripts are not perfect, yet. This is the first regression for years.
Issue still exists after update to 19.1.1.
Expected behavior
There should be no errors. If there are errors, they should not fill up the disk completely.
Relevant log files
tail -n 40 /tmp/PHP_errors.log
(always the same error)
ls -lah /tmp/PHP_errors.log
-rw-r----- 1 squid wheel 454M Feb 17 17:51 /tmp/PHP_errors.log
ls -lah /conf/config.xml
-rw-r--r-- 1 root wheel 159K Feb 17 15:14 /conf/config.xml
ls -lah /usr/local/etc/inc/plugins.inc.d/squid/auth-user.php
-rwxr-xr-x 1 root wheel 3.7K Feb 4 00:53 /usr/local/etc/inc/plugins.inc.d/squid/auth-user.php
uptime
6:03PM up 1 day, 2:38, 1 user, load averages: 1.96, 1.84, 1.69
After a few days of uptime the disk is full.
Environment
OPNsense 19.1.1 (OpenSSL).
qemu
libvirt
virtio
I'm happy to provide additional information if it's required, just ask what you need.
The text was updated successfully, but these errors were encountered: