I am guessing (you give VERY little info) that somewhere on your filing system, as root, you need to do
chmod a+rw database.file.that.gives.permission.error
This will make the file writable by EVERYBODY, which might not be a good idea.
MySQL for example, creates a MySQL -user- who owns the database files and directories, making them accessible only to itself, which is much more secure that what I suggest here.
Perhaps your database program (whatever it is) is not correctly installed or set up?