I am new to geany, and I use it to update html and php files for my server, and I ran into the same issue. I searched online and no luck, then I tried the "sudo chmod 775 filename.xxx" (xxx could stand for php, js, or whatever type of file). This allowed the file to execute when being called from the browser. I was also able to "sudo nano filename.xxx"
So i decided to try the command "sudo geany" which prompted for my password as usual when you use sudo and it worked. I was able to save.
So using the command geany assumes you're logged in as root, and if you are, you shouldn't have permission issues, but if not, you need to "sudo " into geany