Not sure if that is a real bug.
I installed bitcoind and ran it on linux as normal user to initialize everything and to create a .bitoind folder in my /home/user/ . Later I started it again, this time with a leading sudo command. Everything seemd to work, but some files in the chain database now belonged to root:root.
When restarting bitcoind as a normal user, I get the following:
"Error opening block database. Do you want to rebuild the block database now?"
I suggest that the program should somehow prevent the database from being corrupted in this use case, for example by creating a new .bitcoind directory in a folder dedicated to root.