I'm unable to add a domain as a wildcard entry to my blacklist. Adding it as an explicit domain works fine, however trying to add regex or wildcard entries results in an error.
I'm unsure if it's relevant, but the output of ls -l /etc/pihole/regex.list is the following:
-rw-rw-r-- 1 root root 507 Jan 14 21:36 /etc/pihole/regex.list
Expected Behaviour:
Domain is added to blacklist as a regex/wildcard entry
Actual Behaviour:
Popup displays the following message:
Unable to add regex "(^|\.)someDomian\.com$" to /etc/pihole/regex.list
Error message: file_put_contents(/etc/pihole/regex.list): failed to open stream: Permission denied
Be careful when you add regex - they need to be added as regex. This error in your lighttpd log shows that there was a mistake entering a regex - you likely tried to enter it using the wildcard option, rather than the regex option.
2020-01-24 20:47:27: (^|\.)breitbart\.com$ is not a valid domain
I was just entering breitbart.com and selecting the “Add (wildcard)” button since my regex know-how is a little flaky. Your other reply suggesting the permissions change seems to have fixed the issue!