I am self responding so if anyone happens to have a similar thing they have a solution....or better yet a workaround.
I didn't understand how but in the Calibre folder that contains the database if I created a file or folder as pi (but also with sudo) I would create it owned by user 1023 and with write rights only for user 1023 and those in the group and others read only, so in fact I could create a file, as big as I wanted, because I had write rights on the folder but as I wrote the file was created in read and so after that I couldn't edit it.
In the 4 "parallel" folders to Calibre with the same grants and the same owners, on the other hand, I could edit quietly.
I tried everything from changing the folder's grants, setting the setgid, changing umask to looking with getfacl command if the other folders had diversity but nothing.
Finally I created a new CalibreWeb folder, moved all the files from Calibre to CalibreWeb, deleted the Calibre folder and then renamed CalibreWeb to Calibre.
Now everything is working normally...I am left with the bitter taste in my mouth that I did not understand the problem.
PS
Ah the fact that you can create and then edit a file was necessary because SqlLite when you do insert/update creates a temporary file before closing the transaction and then deletes it.
I didn't understand how but in the Calibre folder that contains the database if I created a file or folder as pi (but also with sudo) I would create it owned by user 1023 and with write rights only for user 1023 and those in the group and others read only, so in fact I could create a file, as big as I wanted, because I had write rights on the folder but as I wrote the file was created in read and so after that I couldn't edit it.
In the 4 "parallel" folders to Calibre with the same grants and the same owners, on the other hand, I could edit quietly.
I tried everything from changing the folder's grants, setting the setgid, changing umask to looking with getfacl command if the other folders had diversity but nothing.
Finally I created a new CalibreWeb folder, moved all the files from Calibre to CalibreWeb, deleted the Calibre folder and then renamed CalibreWeb to Calibre.
Now everything is working normally...I am left with the bitter taste in my mouth that I did not understand the problem.
PS
Ah the fact that you can create and then edit a file was necessary because SqlLite when you do insert/update creates a temporary file before closing the transaction and then deletes it.
Statistics: Posted by cldparisi — Sun Dec 24, 2023 10:45 pm