I know this may sound strange, but I need to allow only scripts to write to a certain file.
The file is owned by root, and some users have sudo or root access. They sometimes edit the file by hand, but this is wrong, because there are some scripts that edit the file correctly (while such users do it incorrectly).
So, I'd like that only those scripts have the right to edit the file, while any user can't edit, but only read that file.
Is it possible to do something like this? I know this is silly because they have admin rights, but, at least I'd like to make it hard to edit the files by hand... The scripts can be modified, of course, so if it's possible to obtain a "script-only access token" which grant the write access to such file, the scripts can be changed accordingly.