Fix proxy-mask credential store file permissions on Unix
What does this MR do?
Fix credential store file permissions on Unix
Explicitly chmod newly created credential store files to 0666 to ensure correct permissions regardless of the current umask.
The chmod is only applied when the file is first created to avoid permission errors when the store is accessed from a job image running as a non-root user.
Why was this MR needed?
When the credential store file is created via os.OpenFile with mode 0666, the actual permissions are affected by the process's umask. This can result in overly restrictive permissions on the file, preventing other processes from accessing it as expected.
What's the best way to test this MR?
Tests have been added to ensure the mode is set when expected.