Granting Explicit ACL Access to a File on Linux
Say there is a file, openui/open-webui/webui.db, and you want to have write access to it without using sudo.
The most reliable way is to not use various chown and chmod commands, but instead use setfacl, which is available on Debian via apt install acl.
To first check the permissions, run namei,
$ namei -mo openui/open-webui/webui.db
f: openui/open-webui/webui.db
drwxrwxr-x rik rik openui
drwxrwxr-x 777 rik open-webui
webui.db - Permission denied