Question

I have installed the reviewboard in virtual environment and have created site reviewboard on ubuntu 13.10 using apache2 with mod_wsgi. when i hit the

http://localhost

i was asked to upgarde the site

The version of Review Board running does not match the version the site was last upgraded to. You are running 1.7.20 and the site was last upgraded to 1.7.21.

Please upgrade your site to fix this by running:

and on upgraded

$ rb-site upgrade /home/naveen/venv-review/reviewboard

got

i got following message:

Updating database. This may take a while.

The log output below, including warnings and errors, can be ignored unless upgrade fails.

------------------ ------------------ Creating tables ... Installing custom SQL ... Installing indexes ... Installed 0 object(s) from 0 fixture(s) No evolution required. ------------------- -------------------

Resetting in-database caches. Traceback (most recent call last):
File "/home/naveen/venv-review/bin/rb-site", line 9, in load_entry_point('ReviewBoard==1.7.21', 'console_scripts', 'rb-site')() File "/home/naveen/venv-review/local/lib/python2.7/site-packages/ReviewBoard-1.7.21-py2.7.egg/reviewboard/cmdline/rbsite.py", line 2027, in main command.run() File "/home/naveen/venv-review/local/lib/python2.7/site-packages/ReviewBoard-1.7.21-py2.7.egg/reviewboard/cmdline/rbsite.py", line 1860, in run site.run_manage_command("fixreviewcounts") File "/home/naveen/venv-review/local/lib/python2.7/site-packages/ReviewBoard-1.7.21-py2.7.egg/reviewboard/cmdline/rbsite.py", line 562, in run_manage_command execute_manager(reviewboard.settings, [file, cmd] + params) File "/home/naveen/venv-review/local/lib/python2.7/site-packages/Django-1.4.10-py2.7.egg/django/core/management/init.py", line 459, in execute_manager utility.execute() File "/home/naveen/venv-review/local/lib/python2.7/site-packages/Django-1.4.10-py2.7.egg/django/core/management/init.py", line 382, in execute self.fetch_command(subcommand).run_from_argv(self.argv) File "/home/naveen/venv-review/local/lib/python2.7/site-packages/Django-1.4.10-py2.7.egg/django/core/management/base.py", line 196, in run_from_argv self.execute(*args, **options.dict) File "/home/naveen/venv-review/local/lib/python2.7/site-packages/Django-1.4.10-py2.7.egg/django/core/management/base.py", line 232, in execute output = self.handle(*args, **options) File "/home/naveen/venv-review/local/lib/python2.7/site-packages/Django-1.4.10-py2.7.egg/django/core/management/base.py", line 371, in handle return self.handle_noargs(**options) File "/home/naveen/venv-review/local/lib/python2.7/site-packages/ReviewBoard-1.7.21-py2.7.egg/reviewboard/reviews/management/commands/fixreviewcounts.py", line 16, in handle_noargs starred_public_request_count=None) File "/home/naveen/venv-review/local/lib/python2.7/site-packages/Django-1.4.10-py2.7.egg/django/db/models/manager.py", line 185, in update return self.get_query_set().update(*args, **kwargs) File "/home/naveen/venv-review/local/lib/python2.7/site-packages/Django-1.4.10-py2.7.egg/django/db/models/query.py", line 536, in update rows = query.get_compiler(self.db).execute_sql(None) File "/home/naveen/venv-review/local/lib/python2.7/site-packages/Django-1.4.10-py2.7.egg/django/db/models/sql/compiler.py", line 988, in execute_sql cursor = super(SQLUpdateCompiler, self).execute_sql(result_type) File "/home/naveen/venv-review/local/lib/python2.7/site-packages/Django-1.4.10-py2.7.egg/django/db/models/sql/compiler.py", line 818, in execute_sql cursor.execute(sql, params) File "/home/naveen/venv-review/local/lib/python2.7/site-packages/Django-1.4.10-py2.7.egg/django/db/backends/sqlite3/base.py", line 344, in execute return Database.Cursor.execute(self, query, params) django.db.utils.DatabaseError: attempt to write a readonly database

the sqlite database directory has been given access to server (www-data) like : sudo chown www-data /home/naveen/venv-review/reviewboard/data

Does www-data should have read/write access of site , reviewboard, if it is the case ?

Update *

checking apache2 user

ps aux | grep apache2

root      1146  0.0  0.0  84208  3928 ?        Ss   11:19   0:00 /usr/sbin/apache2 -k start
www-data  3632  0.1  0.6 698464 51056 ?        Sl   11:34   0:01 /usr/sbin/apache2 -k start
www-data  3742  0.1  0.6 698480 51032 ?        Sl   11:34   0:01 /usr/sbin/apache2 -k start
naveen    7162  0.0  0.0  13652   940 pts/1    S+   11:53   0:00 grep apache2
Was it helpful?

Solution

The sqlite3 file, not only the directory, have to be owned and have to be writeable by the user running the web server.

so you may try running, from a terminal shell:

sudo chown -R www-data /home/naveen/venv-review/reviewboard/data
sudo chmod -R u+w /home/naveen/venv-review/reviewboard/data/*

the first command recursively change the owner of the files inside the folder, the second one ensures the users have writing permissions on these files.

Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top