For the longest time I was always able to edit .conf files via SSH on my pihole -- lately when attempting to edit any config I am receiving access denied errors. I have attempted to change permissions to 777 and they won't save.
Is this due to a recent pihole update?
Hm
I have to see if I have another SD card handy that is the same size. I wish there was a simple way to prevent taking a block copy of the pihole to shink it down to restore it on a different card.
recreated a new (fresh package) SD card to attempt to resolve this concern based on your feedback. There was no change to the permission editing .conf @ /etc/dnsmasq.d/
current permissions are 644 attempted to change to 777 and won't save the changes.
I cannot edit any of my .conf and need to make one line change
Attempted sudo nano to open the config, add the change and save... permission denied
also opened the .conf in a text editor like i always do and edited the line, permission denied
copied the .conf to a different system, opened it, saved it, and copied back, permission denied
attempting to review this further without success, there was some discussion about a UID to take ownership in mount options...I am not 100% how to perform this action :-/
The prompt will change from $ to # when successful. What happens when you try now (note you can just use nano without sudo once you are root)? When you are done, use exit to return to the normal user.
Thank you for this info, sorry I am a little rusty on CLI... I attempted these two commands which assisted with the changes that were required.
I was able to get to # and nano to the .conf and edit and save the line successfully, which resolved the rebind-domain-ok= concern I was dealing with, with dnsmasq.d with LAN connections.
I will keep this thread noted for future edits with pihole.
Really appreciate your time!
Good to hear. It is a sort of workaround though and it would be good for you to be able to work out why your normal user with sudo gets Access Denied. It sounds like a policy change or something, but it depends on all kinds such as what OS it is, how it was created, how you normally use it and so on. The command below will show permissions, which may help see if it's a sudo or permission related issue.
Matching Defaults entries pihole:
env_reset, mail_badpass, secure_path=/usr/local/sbin\:/usr/local/bin\:/usr/sbin\:/usr/bin\:/sbin\:/bin,
env_keep+=NO_AT_BRIDGE, env_keep+="http_proxy HTTP_PROXY", env_keep+="https_proxy HTTPS_PROXY",
env_keep+="ftp_proxy FTP_PROXY", env_keep+=RSYNC_PROXY, env_keep+="no_proxy NO_PROXY"
User may run the following commands on pihole:
(ALL : ALL) ALL
(ALL) NOPASSWD: ALL