OpenNetAdmin

Track. Automate. Configure.

Home About Features Community Develop
Download this project as a tar.gz file

Failed to open config file for writing

icesaint05

04-05-2012 00:21:05

Hello. I'm having this error while trying to install ONA

Failed to open config file for writing: '/opt/ona/www/local/config/database_settings.inc.php'.

but when I check the directory there is no such file.

What do I do? Thank you :)

JoeLT

04-05-2012 02:26:38

I think that config file is created by the installation/configuration screens you see when you first open the web interface. You need to make sure that the user ID that your web server runs under has write access to the /opt/ona/www/local/config directory. Did you run the command below from the installation guide?

chown www-data /opt/ona/www/local/config /var/log/ona.log (or whatever your web server user is)

If not, I would execute the above command (adapt it for your chosen install path and web server user ID), and then try running the installation/configuration from the web interface again.

The full install guide is here: http://opennetadmin.com/docs/installation

Good luck!

icesaint05

06-05-2012 21:31:17

Hello. Thank you for your help. I have successfully installed ONA but I can't seem to login. I have this error on top of the login page:

ERROR => Unable to find context name 'DEFAULT' in the ona_contexts configuration. Please check /opt/ona/www/local/config/database_settings.inc.php is configured properly. Reverting back to 'DEFAULT' context.

During the installation I created the "database_settings.inc.php" file using the touch command and the file is 'empty'.

What should I do now?

Sorry for the inconvenience. Thank you

Matt

06-05-2012 22:24:57

Your database_settings.inc.php file should have something in it currently.. If it is still blank then that is certainly the problem. It would seem that the installer failed to create it properly.. As mentioned by JoeLT, as long as the directory is writable by your web server user it should be created for you without the need to be 'touched'.

I'm curious, are you using the tar.gz from opennetadmin.com or are you downloading the source from github.com? There were some recent changes in the github code so I'm curious if I broke something there.

icesaint05

06-05-2012 23:04:08

Hello. I'm using the tar.gz version :)

icesaint05

06-05-2012 23:19:21

Also when I use this command:

chown www-data /opt/ona/www/local/config /var/log/ona.log

I type it like this

chown apache:root /opt/ona/www/local/config /var/log/ona.log

is this correct?

Thank you and Sorry I have so many questions.

icesaint05

07-05-2012 01:34:03

Hello. I have successfully installed ONA Thank you for your help. One problem though I'm logged in as "Guest" and I want to switch to an admin account. I tried:

User: ona_sys
pass: mypassword

but It says "incorrect password". I also tried to use 'root' as user with the same password but still the same response.

How can I fix this?

Thank you :)

Matt

07-05-2012 07:58:47

That password you are trying to use there is the database password for mysql. That is not the password for ONA itself. You would login as admin with a password of admin on the GUI. You can then create other accounts as needed in the administration menu.

http://opennetadmin.com/docs/getting_st ... irst_tasks

icesaint05

07-05-2012 18:35:17

Thank you very much for all your help :)