We have been considering the idea you mention, as we have been having multiple permissions issues with this client since the beginning during the installation we have been trying to create one of these empty files “production.sqlitle3” trying to launch the Job Composer.
With this file I try to test if the python sqlitle3 module can interact with the file using a small script, in this case we use to create two tables (jobs and workflow)
Something like this:
import sqlite3
# Ruta completa al archivo production.sqlite3
db_path = 'production.sqlite3'
# Conectar a la base de datos
conn = sqlite3.connect(db_path)
try:
# Crear un objeto cursor para ejecutar comandos SQL
cursor = conn.cursor()
# Crear la tabla 'jobs' (si no existe)
cursor.execute('''CREATE TABLE IF NOT EXISTS jobs
(id INTEGER PRIMARY KEY, title TEXT, salary REAL)''')
# Crear la tabla 'jobs' (si no existe)
cursor.execute('''CREATE TABLE IF NOT EXISTS workflows
(id INTEGER PRIMARY KEY, title TEXT, salary REAL)''')
# Obtener la lista de tablas
cursor.execute("SELECT name FROM sqlite_master WHERE type='table';")
tablas = cursor.fetchall()
# Imprimir las tablas
print("Tablas en la base de datos:")
for tabla in tablas:
print(tabla[0])
finally:
# Cerrar la conexión a la base de datos, independientemente de si hubo errores o no
print("Close")
conn.close()
We ran this as the user ‘ortegae’ and it seems to create the tables, in fact if we try to launch the Job Composer now the logs say that the columns in these tables are not correct. So in my opinion it is likely that Open Ondemand is having permissions issues interacting with this database, as we were having permissions issues elsewhere in the installation. But from here I don’t know how to check it, can you think of anything?
Once again thank you very much for the help you give us.