There it is and via Ubuntuās now preferred method of using snap (instead of apt).
Check the fileās permissions; it probably belongs to the root account.
In other words, the account you are currently using probably only has āreadā permission but not āwriteā permission. So you can open the file to view it but you canāt save any changes you make.
You can either log in as root or, using your existing account, temporarily raise its privileges to root-level status by prepending sudo to whatever command you execute. For example, if I want to use the nano editor to modify a file (owned by root), Iāll execute it as sudo nano (and then it will prompt me to supply the root accountās password).
Strange I was going to use chmod 775 and then restore after edit.
I can see the file with WINSCP , but when I use the command line to use SUDO it tells me
file does not exits, DIR command shows no files, Oh well onto the UBUNTU site
Just looked at ASK UBUNTU it states you cannot modify a file installed with SNAP you have to rebuild it. Its a safeguard to make sure the install has not been tampered with.It does state ways of remounting the file system elsewhere, but looks pretty involved. New install with apt-get is looking pretty tempting right now
Like @francisp is liking Debian over ubuntu, I donāt care which but I like docker over anything installed on the system. I would not even go for the apt install but go for a docker install.
Given that you installed Home Assistant Supervised, you can simply use its mosquitto addon. Remove the snap-installed instance of mosquitto and proceed to Supervisor > Add-on Store, click Mosquitto broker and follow the instructions.
If you choose to install mosquitto via apt-get, you may eventually need to manage it and that will require skills that you have described as:
You already have easy access to installing mosquitto, as a Home Assistant addon (which is, under the hood, a docker container) so skip apt-get and simplify your life.
Sounds like a good alternative, but I had read people were having problems with the addon of Mosquito with reference to retained messages, which is why I avoided it in the first place.
I think what I will do is put a test system together and try various methods, to see what works and what does not. By the way I knocked up a VM this morning, edited the file as you described and it worked just fine, your a genius.
I have one question for you, if it is now set as retained and I make up test devices which I would like to remove later, I will need to remove the Retained from Mosquitto in order to stop it popping up. I assume I can do this with MQTT Explorer
To remove a topic containing a retained message you simply publish an empty retained message to that topic. That procedure can even be done using Developer Tools > Services and using mqtt.publish with:
Seems perfect, Im not to bothered about using APT installs, its what I have used in the past. I usually use WINSCP for administration unless it requires root access.
On another subject although English Ilive in Cyprus, the virus has nearly cleared up here after the lockdown.Last Iread we had three new cases. How is it with you, Im guessing you live in the States. The newspapers dont always tell the full story