When creating temporary files, agent-to-controller access to create those files is only checked after they've been created in Jenkins 2.318 and earlier, LTS 2.303.2 and earlier.
{
"versions": [
{
"introduced": "0"
},
{
"fixed": "2.303.3"
},
{
"introduced": "0"
},
{
"fixed": "2.319"
}
]
}