Adding wildcard fails - Apache

Please follow the below template, it will help us to help you!

Expected Behaviour:

Wildcard is successfully added and blocked

Actual Behaviour:

Unable to add regex "(^|.)actionclassicgames.com$" to /etc/pihole/regex.list
Error message: file_put_contents(/etc/pihole/regex.list): failed to open stream:

Debug Token:

https://tricorder.pi-hole.net/5le0e4t1vj

Notes:

I have tried the steps from this issue with no luck: Buggy regex.list

I am also using apache 2 instead of lighttpd if it makes a difference.

Why are you manually editing that file?

Edit: Oh, looks like your apache2 doesn't have the ability to access that file.

If I may ask how do I give apache permissions without messing up perms for something else? Preferably without setting perms to 0777.

I don't know, don't have an answer for that.

Ok. Thank you for the explanation though. To anyone curious after this "chmod 0777 /etc/pihole/regex.list" does fix the issue.

Afaik you cant add a group to a group. Also the group webserver does not exist. I have checked which user apache is running from and it is pi. I tried to add pi the the group pihole and ensured that i made the file owned by user and group pihole. This still causes the error though so im not sure what else to do.

At the time I was under the impression that www-data is the group apache uses but setting the file to be owned by pihole:www-data didnt help either.

There's no official support for alternate web servers like apache or nginx, but you may still have a read through a community created guide on Configuring NGINX for Pi-hole and try to draw what analogies you can for your apache installation.

I am unable to reproduce this answer. I am unsure how you added on group to another without just adding each user. As stated previously I did try and give www-data perms by using pihole:www-data but it didnt make a difference.

usermod -a -G www-data pihole should only add the user www-data however this with permision 664 with is rw-rw-r rather than 644 which is rw-r-r did do the job. Thank you for all of your help it is much appriciated.

This topic was automatically closed 21 days after the last reply. New replies are no longer allowed.