after logging into ssh i typed "sudo su username" and tried to create the file. still same issue pops up. I have configured for "superuser". Should i try it from "root user"
Can you paste the output of an ls -la from the folder where you're trying to create the file? you shouldn't need to chmod anything, in fact that's probably a bad idea.
Oh ok, so just save your changes (somewhere else), close your nano editor, then do a sudo nano nodebb.conf and start editing.
I don't use nano so I don't know if there's a way to switch users before writing... like in vim