Here I am Using Ubuntu to run my Django project (Mayan EDMS Open source project ) after running success fully and tried to login into the application and I am not get into home page because of DB is in the read only Mode, can any one help in this will be appreciated.
Are you using default django sqlite3? if yes, then
You have to add writing rights to the directory in which your sqlite database is stored. So running chmod -R u+w /path/ should help.
You should be running the chmod command on the path mayan/media and not the file.
(Note: If you’re looking to deploy this to a production-style environment, you probably don’t want your database in that directory. The last thing you want to have happen is to have someone be able to craft a url that accesses your media directory and allows them to download that file.)
Unfortunately, that doesn’t answer my questions.
What are the permissions on the media directory itself? (What do you get if you do an ls -l if mayan is your current directory?)
How are you running your Django project? What commands or system configuration are you using for this? Is this intended to be a production deployment or is this your development environment?
As a development environment, then I’d say both the media directory and all its contents should have the same ownership as the rest of the files (sayed:sayed). There’s no need to start altering ownership and permissions until deployment.
Any directory that the UID being used for your Django process can access. It more important that its placement fits within your general guidelines for how your server is managed.
I suggest you open a new topic for this. This topic has been marked as solved and so your post is not likely going to attract attention.
When you do so, please don’t post images of code or text. Copy/paste the text into the body of your post, between lines of three backtick - ` characters. This means you’ll have a line of ```, then your code, then another line of ```. This forces the forum software to keep your code properly formatted.
In addition to the directory listing here, also please show how you’re running your Django project, and post the complete error message being received in the logs from your application.
General note: You do not want your project or database in the /var/www directory tree. Those files should remain outside the view of the web server and should only be accessible to the UID running the application. The only files that should possibly be in /var/www would be your static and media files.