fs.CopyFileSync makes the new file read-only

Viewed 19

I am copying a file from one directory to a different one but when the new file is created it is read-only which is giving me permission issues as I want to be able to edit it (it serves as a temporary file created from a template). I've been searching for ways to do fs.copyFileSync and unchecking this attribute but haven't been able to find any actual solutions, does anyone know how to fix this either by making sure the copyFile function doesn't set the attribute or by changing the attribute after the file has been copied?

0 Answers
Related