Django is “unable to open database file”

后端 未结 7 1230
栀梦
栀梦 2020-12-15 02:58

after running \"python manage.py syncdb\" i gett an error saying \"unable to open database file\".

here is the important part from my settings.py:

DA         


        
相关标签:
7条回答
  • 2020-12-15 03:46

    For my linux system, I had to give process owner write permission to both the db.sqlite3 and the directory that contained it! You could just setfacl instead! example: (https://serverfault.com/questions/484818/best-way-to-set-up-permissions-with-nginx-php-fpm-on-shared-hosting).

    (py2.7)[me@server django-project-container]$ ls -la djangoproject/

    drwxrwxr-x. 6 root nginx  4096 Jun 14 01:05 .
    drwxr-xr-x. 6 root root  4096 Jun 13 23:47 ..
    -rwxrwxrwx. 1 root nginx 49152 Jun 14 01:05 db.sqlite3
    
    0 讨论(0)
提交回复
热议问题