Open superunknowndude opened 2 years ago
Move the files from the blocker to a new folder of your choice example /etc/nginx/botblocker.d/
set permissions on that folder as you require, then include that location in your nginx.conf
This seems to have survived the restart/reload of nginx. The cronjob is about to run in an hour. That'll be the real test. I'll update later today. Thanks.
2022/06/28 06:14:03 [warn] 1225970#1225970: duplicate network "138.199.57.151", value: "0", old value: "1" in /etc/nginx/conf.d/globalblacklist.conf:18699
2022/06/28 06:14:03 [warn] 1225970#1225970: duplicate network "143.244.38.129", value: "0", old value: "1" in /etc/nginx/conf.d/globalblacklist.conf:18715
2022/06/28 06:14:03 [warn] 1225970#1225970: duplicate network "195.181.163.194", value: "0", old value: "1" in /etc/nginx/conf.d/globalblacklist.conf:18810
2022/06/28 06:14:03 [warn] 1225970#1225970: duplicate network "5.188.120.15", value: "0", old value: "1" in /etc/nginx/conf.d/globalblacklist.conf:18937
2022/06/28 06:14:03 [warn] 1225970#1225970: duplicate network "89.187.173.66", value: "0", old value: "1" in /etc/nginx/conf.d/globalblacklist.conf:18984
2022/06/28 06:14:03 [emerg] 1225970#1225970: "server_names_hash_bucket_size" directive is duplicate in /etc/nginx/botblocker.d/botblocker-nginx-settings.conf:16
2022/06/28 06:15:47 [warn] 688#688: duplicate network "138.199.57.151", value: "0", old value: "1" in /etc/nginx/conf.d/globalblacklist.conf:18699
2022/06/28 06:15:47 [warn] 688#688: duplicate network "143.244.38.129", value: "0", old value: "1" in /etc/nginx/conf.d/globalblacklist.conf:18715
2022/06/28 06:15:47 [warn] 688#688: duplicate network "195.181.163.194", value: "0", old value: "1" in /etc/nginx/conf.d/globalblacklist.conf:18810
2022/06/28 06:15:47 [warn] 688#688: duplicate network "5.188.120.15", value: "0", old value: "1" in /etc/nginx/conf.d/globalblacklist.conf:18937
2022/06/28 06:15:47 [warn] 688#688: duplicate network "89.187.173.66", value: "0", old value: "1" in /etc/nginx/conf.d/globalblacklist.conf:18984
2022/06/28 06:15:47 [emerg] 688#688: "server_names_hash_bucket_size" directive is duplicate in /etc/nginx/botblocker.d/botblocker-nginx-settings.conf:16
It didn't work. I got a whole slew of new errors. I don't know what to do about this one.
Edit: Found the issue... the cron (or something) is reinstalling a copy of globalblacklist and botblocker-nginx conf files back into the /conf.d/ folder automatically. How do I make this stop?
I'm having a similar issue on Ubuntu 20.04 for Raspberry Pi 4.
open() "/etc/nginx/conf.d/botblocker-nginx-settings.conf" failed (13: Permission denied) in /etc/nginx/nginx.conf:191
Did you figure this out? If not, can someone help?
@Danrancan - permission denied
errors - are because you are not:
root
[ or with sudo
]cron
job from a root
crontab@Danrancan -
permission denied
errors - are because you are not:
running commands as
root
[ or withsudo
]running the scripts as a
cron
job from aroot
crontab
But I am running it in the sudo crontab. Note, this started happening after I did a distribution ubgrade from Ubuntu 20.04 to Ubuntu 22.04. Since the I have reverted to Ubuntu 20.04 again because ubuntu 22.04 broke things on my server. So i cant go back and test what was causing this on my server after upgrading.
Did you look through existing ISSUES ?
Yes
Describe the problem you are experiencing
Nginx error logs are flooded with the same permission denied error from the BadBotBlocker install.
Error Messages
Post any error messages (if applicable):
Copy of nginx.conf
Copy of vhost / website / host .conf file
If applicable please paste your site/vhost configuration file in between the code ticks (paste in between the
markers)
Screenshots
If applicable, add screenshots to help explain your problem.
Server (please complete the following information):
Operating System:
[ ] Ubuntu
[ ] Alpine
[ ] Arch Linux
[ ] Debian
[ ] CentOS
[ ] Fedora
[ ] Deepin
[ ] Windows
[X ] Other
Other Environments [include Version information]
[ ] Plesk
[ ] CPanel
[ ] Synology NAS
[ ] Other
Specify Other / Specific Version Information Here:
Any other applicable log / error messages that may help us to help you.
Additional information
I have the:
included in the sites-available configs that require it. There doesn't seem to be any problem there. It's the conf.d folder that doesn't want to play nice. If I change the permissions of the folder, nginx doesn't have a problem with it. But as soon as the cronjob runs, it resets the globalblacklist config to read only for root and then the permission denied error comes back.
How do I fix this?