DatabaseError at /admin/ attempt to write a readonly database

2,028 views
Skip to first unread message

Fadi Samara

unread,
May 27, 2012, 4:45:18 AM5/27/12
to django...@googlegroups.com
Hi,

I have django running against apache with wsgi, using sqlite3 as my database.

When I run the admin page, I will end up with "attempt to write a readonly database", the only solution worked for me to chmod 777 to the django project directory.According to Django website they don't recommend "Authenticating against Django’s user database from Apache" this solution and left it to the community to make a better solution.

Can any one please point me to a secure and recommended solution to let Apache authenticate a Django project database.

Thanks,

Antoni Aloy

unread,
May 27, 2012, 9:43:22 AM5/27/12
to django...@googlegroups.com
Don't use sqlite, use a postressql or mysql database.

If you just need sqlite:

Create an special user for your application, and addit to the www-data group,
and mark sqlite databse as read/write for that user.

Hope it help!

2012/5/27 Fadi Samara <fadi.a...@gmail.com>:
> --
> You received this message because you are subscribed to the Google Groups
> "Django users" group.
> To view this discussion on the web visit
> https://groups.google.com/d/msg/django-users/-/jBDhsxfRdW4J.
> To post to this group, send email to django...@googlegroups.com.
> To unsubscribe from this group, send email to
> django-users...@googlegroups.com.
> For more options, visit this group at
> http://groups.google.com/group/django-users?hl=en.



--
Antoni Aloy López
Blog: http://trespams.com
Site: http://apsl.net
Reply all
Reply to author
Forward
0 new messages