mirror of
https://github.com/retspen/webvirtmgr.git
synced 2026-04-26 08:05:54 +03:00
[GH-ISSUE #391] separate libraries from user files #293
Loading…
Add table
Add a link
Reference in a new issue
No description provided.
Delete branch "%!s()"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Originally created by @Nowaker on GitHub (Aug 23, 2014).
Original GitHub issue: https://github.com/retspen/webvirtmgr/issues/391
There are two kinds of files. The first is libraries. They should be owned by root, so that under no circumstances can nginx or the webapp itself change its source code. The libraries usually exist in
/usr/lib. PHP apps reside in/usr/share/webapps/directory in Arch Linux, but it's essentially the same. Owned by root, all the source is read only and 100% secure.The other kind of files is user files. They may be config files like some logs, or whatever the Django application creates or changes (e.g.
.secret_key_store). They usually exist in/var/liband have appropriate permissions (0700) and owner (webvirtmgr:webvirtmgr - the same as specified in webvirtmgr.ini supervisord rule).I've built WebVirtMgr package for Arch Linux according to these rules, but failed with this error when running
syncdb. Sure, it succeeds after running as root, but the thing is I'd want.secret_key_storeand the SQLite database to be stored in/var/lib/webvirtmgr, not somewhere in/usr/lib/. It's probably a matter of changing some paths somewhere. Can you advise?What I just came up with is to add an optional parameter:
./manage.py syncdb --dir /var/lib/webvirtmgr. It would generate both the SQLite database and the application config in the given directory. Does it sound good?