5e2dd88beb
Added os.chmod(db_path, 0o664) after database creation to ensure the template database has writable permissions. This prevents sqlite3.OperationalError: attempt to write a readonly database when tests copy and modify the template during test setup. The template database is now created with rw-rw-r-- (664) permissions instead of the default rw-r--r-- (644), allowing the test runner process to write to it. ISSUES CLOSED: #9372