# Settings not saved via web interface

**URL:** <https://discourse.pi-hole.net/t/settings-not-saved-via-web-interface/3219>\
**Category:** Help\
**Created:** [May 17, 2017, 9:08pm UTC](https://discourse.pi-hole.net/t/settings-not-saved-via-web-interface/3219 "2017-05-17T21:08:29Z")\
**Posts on this page:** 20\
**Page:** 2

<div class="post-metadata">

**Author:** ![Valiceemo](https://discourse-cdn.pi-hole.net/user_avatar/discourse.pi-hole.net/valiceemo/32/2825_2.png) [@Valiceemo](https://discourse.pi-hole.net/u/Valiceemo)\
**Post date:** [May 21, 2017, 5:57pm UTC](https://discourse.pi-hole.net/t/settings-not-saved-via-web-interface/3219/21 "2017-05-21T17:57:27Z")

</div>

still having problems, can anyone shed any light?

---

<div class="post-metadata">

**Author:** ![Mcat12](https://discourse-cdn.pi-hole.net/user_avatar/discourse.pi-hole.net/mcat12/32/20_2.png) [@Mcat12](https://discourse.pi-hole.net/u/Mcat12)\
**Post date:** [May 21, 2017, 6:01pm UTC](https://discourse.pi-hole.net/t/settings-not-saved-via-web-interface/3219/22 "2017-05-21T18:01:19Z")

</div>

I don't know why `sudo` is asking for `www-data`'s password when it's set to not require a password on `pihole` commands:

```auto
# /etc/sudoers.d/pihole
# ...snip...
www-data ALL=NOPASSWD: /usr/local/bin/pihole

```

Then only thing I can think of is that it's not actually executing `/usr/local/bin/pihole`, but trying to execute something else. That means that either `pihole` is not stored in that location, or something is trying to run non-`pihole` commands as sudo (bad). What is the output of `which pihole`?

---

<div class="post-metadata">

**Author:** ![Valiceemo](https://discourse-cdn.pi-hole.net/user_avatar/discourse.pi-hole.net/valiceemo/32/2825_2.png) [@Valiceemo](https://discourse.pi-hole.net/u/Valiceemo)\
**Post date:** [May 21, 2017, 6:06pm UTC](https://discourse.pi-hole.net/t/settings-not-saved-via-web-interface/3219/23 "2017-05-21T18:06:21Z")

</div>

hi again,

```auto
pi@raspberrypi:~ $ which pihole
/usr/local/bin/pihole

```

Do you think a full uninstall and reinstall is worth a shot?  
If so, how can i do it to enusre myPi is 100% free of pihole?

---

<div class="post-metadata">

**Author:** ![Mcat12](https://discourse-cdn.pi-hole.net/user_avatar/discourse.pi-hole.net/mcat12/32/20_2.png) [@Mcat12](https://discourse.pi-hole.net/u/Mcat12)\
**Post date:** [May 21, 2017, 6:10pm UTC](https://discourse.pi-hole.net/t/settings-not-saved-via-web-interface/3219/24 "2017-05-21T18:10:03Z")

</div>

The uninstaller needs some more love, especially in terms of removing FTL. If you're able to, I'd suggest a full re-install of Raspbian. Otherwise, go through the uninstaller and do these extra (untested) steps:

```auto
sudo service pihole-FTL stop
sudo rm /usr/bin/pihole-FTL
sudo rm /etc/init.d/pihole-FTL

```

---

<div class="post-metadata">

**Author:** ![DL6ER](https://discourse-cdn.pi-hole.net/user_avatar/discourse.pi-hole.net/dl6er/32/281_2.png) [@DL6ER](https://discourse.pi-hole.net/u/DL6ER)\
**Post date:** [May 21, 2017, 6:11pm UTC](https://discourse.pi-hole.net/t/settings-not-saved-via-web-interface/3219/25 "2017-05-21T18:11:30Z")

</div>

You could try:

```auto
sudo -s
sudo -u www-data pihole enable
exit

```

and have a look what that says

---

<div class="post-metadata">

**Author:** ![Valiceemo](https://discourse-cdn.pi-hole.net/user_avatar/discourse.pi-hole.net/valiceemo/32/2825_2.png) [@Valiceemo](https://discourse.pi-hole.net/u/Valiceemo)\
**Post date:** [May 21, 2017, 6:16pm UTC](https://discourse.pi-hole.net/t/settings-not-saved-via-web-interface/3219/26 "2017-05-21T18:16:23Z")

</div>

> [@Mcat12](#):
>
> The uninstaller needs some more love, especially in terms of removing FTL. If you're able to, I'd suggest a full re-install of Raspbian. Otherwise, go through the uninstaller and do these extra (untested) steps:
> 
> ```auto
> sudo service pihole-FTL stop
> sudo rm /usr/bin/pihole-FTL
> sudo rm /etc/init.d/pihole-FTL
> 
> ```

as my system runs other 'things' id ratehr not re-install for this.

Ill try the below commands from @DL6ER

---

<div class="post-metadata">

**Author:** ![Valiceemo](https://discourse-cdn.pi-hole.net/user_avatar/discourse.pi-hole.net/valiceemo/32/2825_2.png) [@Valiceemo](https://discourse.pi-hole.net/u/Valiceemo)\
**Post date:** [May 21, 2017, 6:17pm UTC](https://discourse.pi-hole.net/t/settings-not-saved-via-web-interface/3219/27 "2017-05-21T18:17:49Z")

</div>

> [@DL6ER](#):
>
> You could try:
> 
> ```auto
> sudo -s
> sudo -u www-data pihole enable
> exit
> 
> ```
> 
> and have a look what that says

it asks me for a password...i enter my root pass and no good?

```auto
pi@raspberrypi:~ $ sudo -s
root@raspberrypi:/home/pi# sudo -u www-data pihole enable

We trust you have received the usual lecture from the local System
Administrator. It usually boils down to these three things:

    #1) Respect the privacy of others.
    #2) Think before you type.
    #3) With great power comes great responsibility.

[sudo] password for www-data:

```

---

<div class="post-metadata">

**Author:** ![deHakkelaar](https://discourse-cdn.pi-hole.net/user_avatar/discourse.pi-hole.net/dehakkelaar/32/674_2.png) [@deHakkelaar](https://discourse.pi-hole.net/u/deHakkelaar)\
**Post date:** [May 21, 2017, 6:55pm UTC](https://discourse.pi-hole.net/t/settings-not-saved-via-web-interface/3219/28 "2017-05-21T18:55:18Z")

</div>

Try:

`echo 'www-data ALL = NOPASSWD : ALL' | sudo tee -a /etc/sudoers`

`sudo -s`  
`sudo -u www-data pihole enable`  
`exit`

`sudo sed -i '$ d' /etc/sudoers`

---

<div class="post-metadata">

**Author:** ![Valiceemo](https://discourse-cdn.pi-hole.net/user_avatar/discourse.pi-hole.net/valiceemo/32/2825_2.png) [@Valiceemo](https://discourse.pi-hole.net/u/Valiceemo)\
**Post date:** [May 21, 2017, 7:05pm UTC](https://discourse.pi-hole.net/t/settings-not-saved-via-web-interface/3219/29 "2017-05-21T19:05:51Z")

</div>

> [@deHakkelaar](#):
>
> Try:
> 
> `echo 'www-data ALL = NOPASSWD : ALL' | sudo tee -a /etc/sudoers`
> 
> `sudo -s`  
> `sudo -u www-data pihole enable`  
> `exit`
> 
> `sudo sed -i '$ d' /etc/sudoers`

```auto
pi@raspberrypi:~ $ echo 'www-data ALL = NOPASSWD : ALL' | sudo tee -a /etc/sudoers
www-data ALL = NOPASSWD : ALL
pi@raspberrypi:~ $ sudo -s
root@raspberrypi:/home/pi# sudo -u www-data pihole enable
::: Blocking has been enabled!
root@raspberrypi:/home/pi# exit
exit
pi@raspberrypi:~ $ sudo sed -i '$ d' /etc/sudoers
pi@raspberrypi:~ $

```

reboot my Pi?

---

<div class="post-metadata">

**Author:** ![deHakkelaar](https://discourse-cdn.pi-hole.net/user_avatar/discourse.pi-hole.net/dehakkelaar/32/674_2.png) [@deHakkelaar](https://discourse.pi-hole.net/u/deHakkelaar)\
**Post date:** [May 21, 2017, 7:16pm UTC](https://discourse.pi-hole.net/t/settings-not-saved-via-web-interface/3219/30 "2017-05-21T19:16:16Z")

</div>

Nothing fixed yet so reboot is no use.  
Try run below one and after, check if fixes anything (FYI, it will add a line to the sudoers file):

`echo 'www-data ALL = NOPASSWD : ALL' | sudo tee -a /etc/sudoers`

If it didnt fix anything, run below one to delete that line again (undo):

`sudo sed -i '$ d' /etc/sudoers`

---

<div class="post-metadata">

**Author:** ![Valiceemo](https://discourse-cdn.pi-hole.net/user_avatar/discourse.pi-hole.net/valiceemo/32/2825_2.png) [@Valiceemo](https://discourse.pi-hole.net/u/Valiceemo)\
**Post date:** [May 21, 2017, 7:22pm UTC](https://discourse.pi-hole.net/t/settings-not-saved-via-web-interface/3219/31 "2017-05-21T19:22:22Z")

</div>

OK, so i seem to be able to make changes in adin page, aqnd they look to be saving.  
but, i still see adverts in my chrome on laptop....i have not set up the DNS server manually on the laptop.  
i also see adverts on android device, with no dns set manually...id like to avoid this?

i guess a solution would be to use pi-hole as dhcp server?

---

<div class="post-metadata">

**Author:** ![deHakkelaar](https://discourse-cdn.pi-hole.net/user_avatar/discourse.pi-hole.net/dehakkelaar/32/674_2.png) [@deHakkelaar](https://discourse.pi-hole.net/u/deHakkelaar)\
**Post date:** [May 21, 2017, 7:24pm UTC](https://discourse.pi-hole.net/t/settings-not-saved-via-web-interface/3219/32 "2017-05-21T19:24:36Z")

</div>

Setup DNS manually first on the laptop to see if works.  
Below one should display the Pi-Hole admin page and if not, something is still wrong:

[http://pi.hole/admin/](http://pi.hole/admin/)

Ps. when you activate the DHCP services on Pi-Hole (make sure router DHCP server is disabled first) , the DHCP leases need renewal on the clients.  
Either disconnect network and reconnect or reboot the clients.

---

<div class="post-metadata">

**Author:** ![Valiceemo](https://discourse-cdn.pi-hole.net/user_avatar/discourse.pi-hole.net/valiceemo/32/2825_2.png) [@Valiceemo](https://discourse.pi-hole.net/u/Valiceemo)\
**Post date:** [May 21, 2017, 7:26pm UTC](https://discourse.pi-hole.net/t/settings-not-saved-via-web-interface/3219/33 "2017-05-21T19:26:39Z")

</div>

> [@deHakkelaar](#):
>
> Setup DNS manually first on the laptop to see if works.  
> Below one should display the Pi-Hole admin page and if not, something is still wrong:
> 
> [http://pi.hole/admin/](http://pi.hole/admin/)

thanks for your help.

if i set DNS manually on laptop, adverts seem to be blocked.

`http://pi.hole/admin/` gives me a 404 error. But i have changed the port from the default 80 as it was interfering with my home assistant install...emulated hue componenet requires port 80

---

<div class="post-metadata">

**Author:** ![deHakkelaar](https://discourse-cdn.pi-hole.net/user_avatar/discourse.pi-hole.net/dehakkelaar/32/674_2.png) [@deHakkelaar](https://discourse.pi-hole.net/u/deHakkelaar)\
**Post date:** [May 21, 2017, 7:33pm UTC](https://discourse.pi-hole.net/t/settings-not-saved-via-web-interface/3219/34 "2017-05-21T19:33:12Z")

</div>

> [@Valiceemo](#):
>
> But i have changed the port from the default 80 as it was interfering with my home assistant install...emulated hue componenet requires port 80

A little bit more work but you can configure the Pi to have two IP addresses.  
So Pi-Hole can bind to the first IP address (recommended) and the other port 80 service could bind to the second IP addrerss.  
Have a look at below one how its done with lighttpd and nginx (both competing for port 80):

> [@Conflict with other webservices running on Pi (Ports 80 and 443)](https://discourse.pi-hole.net/t/conflict-with-other-webservices-running-on-pi-ports-80-and-443/2329/8):
>
> For example if you want to setup like below: 10.0.0.10:80 --\> lighttpd (for Pi-Hole) 10.0.0.20:80 --\> nginx (your other web apps via HTTP) 10.0.0.20:443 --\> nginx (your other web apps via HTTPS) In the "interfaces" file, you add alias interface "eth0:0" with second IP: \*replace IP address and netmask to suit your needs. { echo echo 'auto eth0:0' echo 'allow-hotplug eth0:0' echo 'iface eth0:0 inet static' echo ' address 10.0.0.20' echo ' netmask 255.255.255.0' } | sudo tee -a…

---

<div class="post-metadata">

**Author:** ![Valiceemo](https://discourse-cdn.pi-hole.net/user_avatar/discourse.pi-hole.net/valiceemo/32/2825_2.png) [@Valiceemo](https://discourse.pi-hole.net/u/Valiceemo)\
**Post date:** [May 21, 2017, 7:38pm UTC](https://discourse.pi-hole.net/t/settings-not-saved-via-web-interface/3219/35 "2017-05-21T19:38:01Z")

</div>

> [@deHakkelaar](#):
>
> > [@Valiceemo](#):
> >
> > But i have changed the port from the default 80 as it was interfering with my home assistant install...emulated hue componenet requires port 80
> 
> A little bit more work but you can configure the Pi to have two IP addresses.  
> So Pi-Hole can bind to the first IP address (recommended) and the other port 80 service could bind to the other.  
> Have a look at below one how its done with lighttpd and nginx (both competing for port 80):
> 
> [Conflict with other webservices running on Pi (Ports 80 and 443) - #8 by deHakkelaar](https://discourse.pi-hole.net/t/conflict-with-other-webservices-running-on-pi-ports-80-and-443/2329/8)

whats the benefit of doing this method?

i simply changed the `lighttpd.conf` file in `/etc/lighttpd`

---

<div class="post-metadata">

**Author:** ![Mcat12](https://discourse-cdn.pi-hole.net/user_avatar/discourse.pi-hole.net/mcat12/32/20_2.png) [@Mcat12](https://discourse.pi-hole.net/u/Mcat12)\
**Post date:** [May 21, 2017, 7:41pm UTC](https://discourse.pi-hole.net/t/settings-not-saved-via-web-interface/3219/36 "2017-05-21T19:41:22Z")

</div>

Redirected ads will hit port 80, and we can't change that. So if you set up a dedicated Pi-hole IP address, then the blocked ads will be handled by the Pi-hole instead of the hue component setup you have on port 80 right now.

---

<div class="post-metadata">

**Author:** ![Valiceemo](https://discourse-cdn.pi-hole.net/user_avatar/discourse.pi-hole.net/valiceemo/32/2825_2.png) [@Valiceemo](https://discourse.pi-hole.net/u/Valiceemo)\
**Post date:** [May 21, 2017, 7:44pm UTC](https://discourse.pi-hole.net/t/settings-not-saved-via-web-interface/3219/37 "2017-05-21T19:44:05Z")

</div>

> [@Valiceemo](#):
>
> more problems with pi-hole
> 
> settings changed on the web interface are not being saved
> 
> eg, changing the upstream dns servers?  
> i can tick / untick boxes, click save and i get the confirmation message, but the boxes are still in their original state
> 
> im actually trying to set the dhcp server to on, but see the same behavior.
> 
> i have tried on multiple platforms, on multiple devices and still cannot get settings to be saved
> 
> i have alos ran `sudo puhole -r` and selected `repair` and no joy  
> i have cleared browser cache, and rebooted my pi.  
> all with no success
> 
> has anyone seen this?

a ok, so even having changed `server.port = 8017` in `/etc/lighttpd/lighttpd.conf` ads are still sent to port 80?

---

<div class="post-metadata">

**Author:** ![deHakkelaar](https://discourse-cdn.pi-hole.net/user_avatar/discourse.pi-hole.net/dehakkelaar/32/674_2.png) [@deHakkelaar](https://discourse.pi-hole.net/u/deHakkelaar)\
**Post date:** [May 21, 2017, 7:44pm UTC](https://discourse.pi-hole.net/t/settings-not-saved-via-web-interface/3219/38 "2017-05-21T19:44:40Z")

</div>

Affirmative.

123456789

---

<div class="post-metadata">

**Author:** ![Valiceemo](https://discourse-cdn.pi-hole.net/user_avatar/discourse.pi-hole.net/valiceemo/32/2825_2.png) [@Valiceemo](https://discourse.pi-hole.net/u/Valiceemo)\
**Post date:** [May 21, 2017, 7:45pm UTC](https://discourse.pi-hole.net/t/settings-not-saved-via-web-interface/3219/39 "2017-05-21T19:45:56Z")

</div>

> [@deHakkelaar](#):
>
> Affirmative.

copy that....

and, also

> [@deHakkelaar](#):
>
> 123456789

what!?!

---

<div class="post-metadata">

**Author:** ![deHakkelaar](https://discourse-cdn.pi-hole.net/user_avatar/discourse.pi-hole.net/dehakkelaar/32/674_2.png) [@deHakkelaar](https://discourse.pi-hole.net/u/deHakkelaar)\
**Post date:** [May 21, 2017, 7:46pm UTC](https://discourse.pi-hole.net/t/settings-not-saved-via-web-interface/3219/40 "2017-05-21T19:46:50Z")

</div>

Messages should be at least 20 characters long 😃

[Previous page](https://discourse.pi-hole.net/t/settings-not-saved-via-web-interface/3219.md?page=1)

[Next page](https://discourse.pi-hole.net/t/settings-not-saved-via-web-interface/3219.md?page=3)
