Wrong file permission when I copy a file
I have a C-function that create a file and then make a copy in the same directory, but somethin is wrong with permission or owners.
The program starts as root user.
The file creates by the program:
-rwxrwxrwx 1 root staff 199680 Oct 18 10:58 test
Ok, but after copying the permission is not the same.
The file after copying (with new name) by the program:
-rw-r--r-- 1 root root 199680 Oct 18 10:58 test_copy
I want to have full permission of the copy, how to do??