Sanity checks, single user mode, easier seq uids, fix comma EOL bug, status page, seq reporting, seq uid purging,

This commit is contained in:
tyler committed 2023-05-28 01:43:56 -07:00
1 parent 5f06c80882
commit e9258c34f6
2 files changed
+116 -94

No files matched your search

+13
View File
@@ -0,0 +1,13 @@
# Check if all the files needed by kjv-api (to write to) are also owned by the user running it.
# if this is not the same, writing to data/seq.db (and other undesirable behavior) is inevitable
# and will save a lot of headache in the future.
#Additionally, proper CHMOD value is 664 for the database
from os import stat, getuid
def check_sanity():
dependancies = ['data/seq.db']
current_uid = getuid()
for dependancy in dependancies:
if stat(dependancy).st_uid != current_uid:
raise PermissionError(dependancy)