My sqlite db file is this: unable to open database file i chowned all folders until my dbfile to root. but i am still getting this error. but i remember that while creating my django project on server, i created a superuser, and now if i do ls -l i see that the user is that superuser. how is it possible to tell apache that this superuser should have that right to write/read the db file? or how to solve the problem, i am not apache/linux guru..
Add a comment
|
3 Answers
Execute chown www-data:www-data directory on the directory you want apache to be able to write to.
11 Comments
doniyor
yeah but it is saying: invalid group www-data. do i have to create it first?
doniyor
see my last comment above, but still unable to open database file.
Priyank Patel
cat /etc/group | grep www-data type this to see whether group exists.doniyor
oh yeah, the group exists. is it a group or a user? because it is on users list.
Priyank Patel
it is a group. try this in your project root directory .
sudo chown -Rf www-data * |
You should be able to just leave the file as owned by the super user and just change the group so that apache can read/write it as well.
Change the group for the sqlite file and the containing directory. Try this:
cd <directory with sqlite file>
sudo chgrp www-data . <sqlitefile>